```Date: Fri, 8 Dec 2000 20:40:58 GMT Reply-To: Charles_S_Patridge@PRODIGY.NET Sender: "SAS(r) Discussion" From: Charles Patridge Organization: Deja.com - Before you buy. Subject: Re: Rounding up 0.5 to 1 John, Thinking quickly about this: interval = round( (length/30) + .5 , 1.0); HTH, Charles Patridge I do not remember if there was anything in the round function that would allow you to make a "roundup or rounddown" choice. Charles_S_Patridge@prodigy.net In article <200012081952.NAA09113@bama.ua.edu>, JGerstle@SW.UA.EDU wrote: > Hallo! > > I'm working on calculating a rate (freq/number of intervals) and I > need to make sure that the number of intervals is rounded up to the > next integer. Sample code: > > interval = round(length/30, 1.0); > interval2 = round(length/30, 0.1); > > I have interval2 to check to see if interval one is rounded correctly. > Problem is this, if length/30 = say 30.5, interval2=30.5 but > interval=30 and not 31, as I'd like it to. > > Soooo, what is the best way to make the round statement round > up? I looked through Help but was not successful in finding a clue. > > Thanks much, > John Gerstle > > John Gerstle > Program Analyst, Sr. > Applied Gerontology Program > University of Alabama > -- Charles Patridge - PDPC, Ltd. 172 Monce Road - Burlington, CT 06013 USA Phone: 860-673-9278 or 860-675-9026 Email: Charles_S_Patridge@prodigy.net - Web: www.sconsig.com Sent via Deja.com http://www.deja.com/ Before you buy. ```

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