ID:               32518
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at mijav dot dk
-Status:           Open
+Status:           Wont fix
 Bug Type:         Math related
 Operating System: *
 PHP Version:      4CVS, 5CVS (2005-03-31)


Previous Comments:
------------------------------------------------------------------------

[2005-03-31 16:44:47] php at mijav dot dk

Description:
------------
Tthe number -0,00 is non-existent and inconsistent, pointed out in a
duplicate bug report, and therefore the output is jibberish.

If you do a number_format(round($foo,2), 2, ",", "."); then the output
will be correct/as expected. This is also why number_format should be
considered buggy. If number_format rounds before formatting, it should
be consistent: -0,00 isn't consistent since -0,505 gets rounded to
-0,51.

Please re-evaluate the situation. The output -0,00 is not useful.

Please note that our production server uses 4.3.8, but the Changelog
reports nothing about a fix, and the previous bug report was marked
Bogus.

Reproduce code:
---------------
<?
echo number_format(-0.0012499999998, 2, ",", ".");
?>

Expected result:
----------------
0,00

Actual result:
--------------
-0,00


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


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

Reply via email to