[futurebasic] Re: [FB] Rounding Rule

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2002 : Group Archive : Group : All Groups

From: Peter A Boyle <pboyle@...>
Date: Thu, 16 May 2002 14:47:13 -0400
on 16/05/02 11:39, Bernie Wylde at bernie.w@... wrote:

> Ken's recent logic problem got me looking at rounding.
> 
> Isn't the rounding rule: ".5 and higher are rounded up and lower values are
> rounded down"?
> 
> Well,
> 
> INT(1.5) = 2
> 
> but
> 
> INT(2.5) = 2
> 
> It appears that whenever the number before the decimal is even, then INT(i)
> rounds down, not up.
> 
> Can anyone explain this?
> 
> Bernie
> 
> 
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>
> 
> 
Sorry that does'nt do it
try
LOCAL FN Round#(num#,place)
END FN= FIX(num#*10^place+.5)/10^place