From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.2
PHP Bug Type:     *Math Functions
Bug description:  number_format do not round correctly

<?
echo number_format(0.49)."<br>";
echo number_format(0.50)."<br>";
echo number_format(0.51)."<br><br>";

echo round(0.49)."<br>";
echo round(0.50)."<br>";
echo round(0.51)."<br>";
?>

returns

0
0
1

0
1
1

number_format do not round correctly while round does.

-- 
Edit bug report at http://bugs.php.net/?id=21801&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21801&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21801&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21801&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21801&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21801&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21801&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21801&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21801&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21801&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21801&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21801&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21801&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21801&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21801&r=gnused

Reply via email to