#23608 [NEW]: Error in round() numbers

From: Date: Tue, 13 May 2003 14:24:18 +0000
Subject: #23608 [NEW]: Error in round() numbers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39527@lists.php.net to get a copy of this message
From: lorang at e-connect dot lu Operating system: Linux RedHat 8.0 PHP version: 4.3.1 PHP Bug Type: Math related Bug description: Error in round() numbers Starnge bug : $tva=1.005+0.005-0.005; echo number_format($tva,2); outputs 1.00 instead of 1.01 but : $tva=1.005+(0.005-0.005); echo number_format($tva,2); outputs 1.01 what is correct but this should not be influenced by the brackets. and : $tva=1.05+0.05-0.05; echo number_format($tva,1); outputs 1.1 what is correct Thankx for reply Regards, Lorang Jacques -- Edit bug report at http://bugs.php.net/?id=23608&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23608&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23608&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23608&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23608&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23608&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23608&r=support Expected behavior: http://bugs.php.net/fix.php?id=23608&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23608&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23608&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23608&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23608&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23608&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23608&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23608&r=gnused

« previous php.bugs (#39527) next »