[php-src] Issue #13590: Calculation problems with comma numbers
| From: | pactamah11 | Date: | Mon, 04 Mar 2024 09:39:23 +0000 |
| Subject: | [php-src] Issue #13590: Calculation problems with comma numbers | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246502@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13590
Author: pactamah11
### Description
Description:
Issue is when you have almost identical number which subtraction number is less that 1, then
calculation of those number are wrong.
The following code:
```php
<?php
$number1 = 1818.00;
$number2= 1817.99;
echo $number1 - $number2;
```
Resulted in this output:
```
0.0099999999999909
```
But I expected this output instead:
```
0.01
```
### PHP Version
PHP 8.2.0
### Operating System
_No response_