#41907 [NEW]: wrong result from round(64.365,2)
| From: | milman at gmx dot de | Date: | Thu, 05 Jul 2007 16:27:24 +0000 |
| Subject: | #41907 [NEW]: wrong result from round(64.365,2) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-114679@lists.php.net to get a copy of this message | ||
From: milman at gmx dot de
Operating system: windows xp
PHP version: 5.2.3
PHP Bug Type: *Math Functions
Bug description: wrong result from round(64.365,2)
Description:
------------
wrong result from round(64.365,2)
should be 64.37 not 64.36
Reproduce code:
---------------
<?
echo "right: round (63.365,2) = " . round (63.365,2) . "<br>\n" ;
echo "wrong: round (64.365,2) = " . round (64.365,2) . "<br>\n" ;
echo "wrong: round (81.365,2) = " . round (81.365,2) . "<br>\n" ;
echo "right: round (82.365,2) = " . round (82.365,2) . "<br>\n" ;
?>
Expected result:
----------------
allway .37 not somtimes .36
--
Edit bug report at http://bugs.php.net/?id=41907&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41907&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41907&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41907&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41907&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41907&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41907&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41907&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41907&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41907&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41907&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41907&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41907&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41907&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41907&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41907&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41907&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41907&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41907&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41907&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41907&r=mysqlcfg