[PHP] Re: Problem with number_format

2004-05-25 Thread Martin Geisler
[EMAIL PROTECTED] (Curt Zirzow) writes: > * Thus wrote Martin Geisler ([EMAIL PROTECTED]): >> >> Caution >> >> When rounding on exact halves round() rounds down on evens and up >> on odds. [...] > > This is a documentation error. And is not on the current > documentation. Indeed you're righ

Re: [PHP] Re: Problem with number_format

2004-05-25 Thread fku
>Martin Geisler wrote: > >> My PHP manual (from a Debian package) has the following note on the > page for >round(): >> > Caution >> >> When rounding on exact halves round() rounds down on evens and up on >> odds. If you want to always force it in one direction on a .5 (or >> .05 in your c

Re: [PHP] Re: Problem with number_format

2004-05-25 Thread Curt Zirzow
* Thus wrote Martin Geisler ([EMAIL PROTECTED]): > My PHP manual (from a Debian package) has the following note on the > page for round(): > > Caution > > When rounding on exact halves round() rounds down on evens and up on > odds. If you want to always force it in one direction on a .5 (or >

Re: [PHP] Re: Problem with number_format

2004-05-25 Thread Jordi Canals
Martin Geisler wrote: My PHP manual (from a Debian package) has the following note on the page for round(): Caution When rounding on exact halves round() rounds down on evens and up on odds. If you want to always force it in one direction on a .5 (or .05 in your case) add or substract a tiny

[PHP] Re: Problem with number_format

2004-05-25 Thread Martin Geisler
[EMAIL PROTECTED] writes: > please suppose PHP 4.3.2 and $number=502,3550 > > number_format($number,2,'.',' ') returns 502.36. > > It seems ok, but if $number=253,0650 > > number_format($number,2,'.',' ') returns 253.06 instead of 253.07. My PHP manual (from a Debian package) has the following n