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.
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
=====================================================================