LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 1997, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 12 Nov 1997 10:42:18 PST
Reply-To:     TWB2%Rates%FAR@bangate.pge.com
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Tim Berryhill 3rd time <TWB2%Rates%FAR@BANGATE.PGE.COM>
Subject:      Re: SAS Function to round up.
Comments: To: hien_hoang@AFCC.COM

Hien, The CEIL function is similar to what you request, but it works to the nearest integer--it does not allow you to specify a precision like ROUND does.

How about NEWVAL=100*(CEIL(OLDVAL/100));

By the way, it looks like CEIL(7+10**(-14)) is 7 rather than 8. This is not a problem if your numbers are integers. Unfortunately, SAS does not have an integer data type.

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0 ----------------------[Reply - Original Message]----------------------

Sent by:"Hoang, Hien" <hien_hoang@AFCC.COM> Is there a SAS function to round a number up? The round() function seems to round the number up or down depending on the rounding unit.

round(233, 100); ** will return 200; round(250, 100); ** will return 300;

This is what I want:

round (233, 100); ** will return 300; round (250, 100); ** will return 300;

Thanks, Hien

=====================================================================


Back to: Top of message | Previous page | Main SAS-L page