Edit report at http://bugs.php.net/bug.php?id=53337&edit=1
ID: 53337 Updated by: ras...@php.net Reported by: richcem at 163 dot com Summary: a count error -Status: Open +Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: xp sp3 PHP Version: 5.2.14 Block user comment: N Private report: N 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. . Previous Comments: ------------------------------------------------------------------------ [2010-11-18 06:22:33] richcem at 163 dot com Description: ------------ echo 100-99.9; //0.099999999999994 Test script: --------------- echo 100-99.9; //0.099999999999994 Expected result: ---------------- //exp : 0.1 echo 100-99.9; //0.099999999999994 Actual result: -------------- 0.099999999999994 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53337&edit=1