ID: 27332 Updated by: [EMAIL PROTECTED] Reported By: valeriy-v at yandex dot ru -Status: Open +Status: Bogus Bug Type: Math related Operating System: windows xp PHP Version: 4.3.4 New Comment:
Floating point values have a limited precision. Hence a value might not have the same string representation after any processing. That also includes writing a floating point value in your script and directly printing it without any mathematical operations. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2004-02-20 10:43:56] valeriy-v at yandex dot ru Description: ------------ <?php echo 22512.65+0-22511.03,'<br>'; ?> will print 1.6200000000026 Reproduce code: --------------- <?php echo 22512.65+0-22511.03,'<br>'; ?> Expected result: ---------------- wrong result 1.6200000000026 Actual result: -------------- 1.68 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27332&edit=1
