Bug #10411: number_format returns wrong values
| From: | mark at artshouse dot com | Date: | Thu, 19 Apr 2001 21:35:01 +0000 |
| Subject: | Bug #10411: number_format returns wrong values | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52014@lists.php.net to get a copy of this message | ||
From: mark@artshouse.com
Operating system: Solaris 8, Slackware 7.0
PHP version: 4.0.4pl1
PHP Bug Type: Unknown/Other Function
Bug description: number_format returns wrong values
number_format returns wrong values in certain situations,
here is a code example...
$value = 504;
$calcs_a = number_format($value,2);
$othervalue = 504;
$calcs_b = number_format($othervalue,2);
$total = number_format($calcs_a + calcs_b,2);
this returns:
$calcs_a is 504.00
$calcs_b is 504.00
$total is 1.00 (should be 1008.00)
I have seen this on several occasions now on multiple
machines/setups/Oses
--
Edit Bug report at: http://bugs.php.net/?id=10411&edit=1