PHP 4.0 Bug #8164 Updated: weird subtraction result
| From: | c dot becker at provi dot de | Date: | Fri, 08 Dec 2000 16:49:31 +0000 |
| Subject: | PHP 4.0 Bug #8164 Updated: weird subtraction result | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40577@lists.php.net to get a copy of this message | ||
ID: 8164
User Update by: c.becker@provi.de
Status: Open
Bug Type: Math related
Description: weird subtraction result
this won't work, either.
$one = 555.6;
$two = 555.5;
$result = $one - $two;
echo $result;
Previous Comments:
---------------------------------------------------------------------------
[2000-12-08 06:23:13] c.becker@provi.de
I don't know, if this is a Math related problem,
it is a simple subtraction problem.
If I type this
$one = "555.6";
$two = "555.5";
$result = $one - $two;
echo $result;
the result in my browser is
0.10000000000002
This occurs with more numbers than above.
So, what is my problem?
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8164