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

 ID:                 64390
 Updated by:         johan...@php.net
 Reported by:        bugzilla77 at gmail dot com
 Summary:            round() corrupted
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Math related
 Operating System:   Win 7
 PHP Version:        5.5.0alpha5
 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-08 11:45:17] bugzilla77 at gmail dot com

Description:
------------
Negative zero in mathematics does not exist.


Test script:
---------------
<?=round(-0.1)?>


Expected result:
----------------
0


Actual result:
--------------
-0



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



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

Reply via email to