From: david at ewebdevelopers dot com
Operating system: windows 2000
PHP version: 4.3.1
PHP Bug Type: Math related
Bug description: number_format of 0.x with notation returns -0.00
$num = -1.3322676295502E-015;
echo number_format($num, 2, '.', ',');
if(((float) number_format(($num, 2,'.', ',')) == 0){
echo 'true';
}
number_format should not evaluate to -0.00
should evaluate to 0.00 because there is no such thing as -0;
--
Edit bug report at http://bugs.php.net/?id=23866&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23866&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23866&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23866&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23866&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23866&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23866&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23866&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23866&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23866&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23866&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23866&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23866&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23866&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23866&r=gnused