And that is the wrong result. Where did you learn your math?
    Rounding happens UP when the number to be rounded is >= 5..
        
    --Jani
    

On Thu, 26 Jun 2003, Sterling Hughes wrote:

>sterling               Wed Jun 25 23:21:45 2003 EDT
>
>  Modified files:              
>    /php-src/ext/standard/tests/math   bug24142.phpt 
>  Log:
>  according to the notes in the bugs database, this is the correct result.
>  this result is also the same one given in 4.3.2 and 5.0
>  
>  
>Index: php-src/ext/standard/tests/math/bug24142.phpt
>diff -u php-src/ext/standard/tests/math/bug24142.phpt:1.2 
>php-src/ext/standard/tests/math/bug24142.phpt:1.3
>--- php-src/ext/standard/tests/math/bug24142.phpt:1.2  Mon Jun 16 15:59:27 2003
>+++ php-src/ext/standard/tests/math/bug24142.phpt      Wed Jun 25 23:21:45 2003
>@@ -1,10 +1,10 @@
> --TEST--
> Bug #24142 (round() problems)
> --FILE--
>-<?php // $Id: bug24142.phpt,v 1.2 2003/06/16 19:59:27 sniper Exp $ vim600:syn=php
>+<?php // $Id: bug24142.phpt,v 1.3 2003/06/26 03:21:45 sterling Exp $ vim600:syn=php
> echo round(5.045, 2). "\n";
> echo round(5.055, 2). "\n";
> ?>
> --EXPECT--
>+5.04
> 5.05
>-5.06
>
>
>
>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to