[PHP-DEV] Re: Rounding....Message repeated

2002-06-21 Thread George Whiffen
> Repeat of previous message in thread without the extra ugly wrapping, (sorry!!!) Matthew Clark wrote: Seeing as the mathematically correct way to round numbers is to round down to n for n-1<=m<=n.5 and up to n+1 for n.5= 0.0) return_val = floor(pow(10.0,places - DBL_DIG)) + 0.5 + re

[PHP-DEV] Re: Rounding....

2002-06-21 Thread George Whiffen
Matthew Clark wrote: > Seeing as the mathematically correct way to round numbers is to round down > to n for n-1<=m<=n.5 and up to n+1 for n.5 round() function couldn't include a little 'fuzz' to handle the rounding > problems we encounter due to floating point representation in the hardware? >