-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.4.2 wrong round() #17253
Comments
If that helps, see this one #17136 |
I don't see anything wrong
PHP 8.4 is right here Behavior change is documented |
Notice teh behavior have changed in 5.2.7 (yes, quite old) |
Floating arithmetic fun:
|
My favorite is still |
also found this fun situation: |
10.075 actually is 10.0749999999999992895 and 0.05 actually is 0.0500000000000000027756. The division between those is 201.499999999999971578, which is different than 201.5 (which is the next-higher float). |
presumed something like this, but the problem is result being different for 8.3 and 8.4, that will cause problems while upgrading |
Description
The following code:
Resulted in this output:
But I expected this output instead:
Without round we get 25.625, so after round it must be 25.63
PHP Version
PHP 8.4.2
Operating System
No response
The text was updated successfully, but these errors were encountered: