[php-src] Issue #10661: basic math: 19.99 * 100 = 19.98
| From: | d1ca | Date: | Wed, 22 Feb 2023 09:13:18 +0000 |
| Subject: | [php-src] Issue #10661: basic math: 19.99 * 100 = 19.98 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243778@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10661
Author: d1ca
### Description
The following code:
```php
echo (int)(19.99 * 100);
echo (int)(string)(19.99 * 100);
<?php
```
Resulted in this output:
``` 1998
``` 1999
But I expected this output instead:
``` 1999
``` the second statement is a ugly workaround
### PHP Version
all versions
### Operating System
_No response_