Re: [PHP] round behavior changed

2006-05-20 Thread tedd
At 3:17 PM -0500 5/19/06, Richard Lynch wrote: On Fri, May 19, 2006 1:27 pm, Sébastien Guay wrote: I searched the archives but did not found anything. It seem that the round function behavior has changed in php 4.4.x (I don't have 4.4.1 handy for testing). In 4.3.11, the output of

[PHP] round behavior changed

2006-05-19 Thread Sébastien Guay
Hi, I searched the archives but did not found anything. It seem that the round function behavior has changed in php 4.4.x (I don't have 4.4.1 handy for testing). In 4.3.11, the output of round(23.005,2) is 23.01 which is mathematically correct. In 4.4.2, the output is 23 which is not correct.

Re: [PHP] round behavior changed

2006-05-19 Thread tg-php
I seem to remember something about rounding functions and accounting.. that there's a rule in accounting that says if the trailing number is even you round down, odd you round up.. or something like that. I know that's different than standard 'math' but in accounting it apparently helps deal

Re: [PHP] round behavior changed

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 1:27 pm, Sébastien Guay wrote: I searched the archives but did not found anything. It seem that the round function behavior has changed in php 4.4.x (I don't have 4.4.1 handy for testing). In 4.3.11, the output of round(23.005,2) is 23.01 which is mathematically