ID: 47107 Updated by: j...@php.net Reported By: mucahitkahveci at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows xp sp2 PHP Version: 5.2.8 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. If you would like to know more about "floats" and what IEEE 754 is, read this: http://docs.sun.com/source/806-3568/ncg_goldberg.html Thank you for your interest in PHP. And 32bit issue..etc. etc. No bug. Previous Comments: ------------------------------------------------------------------------ [2009-01-14 19:57:52] mucahitkahveci at gmail dot com Description: ------------ printf('%f', 55555555555555555555); prints 55555555555555557376.000000 This number (555...) has 20 digits this happen in any number with more than 15 digits Reproduce code: --------------- printf('%f', 55555555555555555555); Expected result: ---------------- 55555555555555555555.000000 Actual result: -------------- 55555555555555557376.000000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47107&edit=1