You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did some calculations then output the results using var_dump(), Then I got
-1403.5449999999837
-1403.5449999999992
and to my surprise they were rounded different (0.54/0.55 while should be 0.54 always).
I did some experiments and found out that the problem shows if the integer part is >=1000.
I know how to fix this for me but just in case I report this as a possible bug.
Note that the long fractional parts (.54499999998) displayed by echo in 2 cases are not a problem for me.
PHP Version
8.2.0
Operating System
Windows 8.1
The text was updated successfully, but these errors were encountered:
Description
The following code:
Resulted in this output:
But I expected this output instead:
I did some calculations then output the results using var_dump(), Then I got
-1403.5449999999837
-1403.5449999999992
and to my surprise they were rounded different (0.54/0.55 while should be 0.54 always).
I did some experiments and found out that the problem shows if the integer part is >=1000.
I know how to fix this for me but just in case I report this as a possible bug.
Note that the long fractional parts (.54499999998) displayed by echo in 2 cases are not a problem for me.
PHP Version
8.2.0
Operating System
Windows 8.1
The text was updated successfully, but these errors were encountered: