Edit report at https://bugs.php.net/bug.php?id=64491&edit=1

 ID:                 64491
 Updated by:         ni...@php.net
 Reported by:        mihai at iorga dot eu
 Summary:            float numbers won't add up
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Math related
 Operating System:   any
 PHP Version:        5.4.13
 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://www.floating-point-gui.de/

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------
[2013-03-22 14:09:13] mihai at iorga dot eu

Description:
------------
echo (int)((0.1 + 0.7) * 10);

Test script:
---------------
echo (int)((0.1 + 0.7) * 10);



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64491&edit=1

Reply via email to