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
Note the final 5 instead of 4. The problem seems to be in the code that parses the decimal part of a number. Indeed, the following equivalent code gives the same erroneous result:
I was running some generative tests on my code and I ran into an issue with high precision floats. For example:
Note the final
5
instead of4
. The problem seems to be in the code that parses the decimal part of a number. Indeed, the following equivalent code gives the same erroneous result:I'm not sure about the best way to modify
fraction
so as to avoid rounding errors. Maybe using the nativeparseFloat
?The text was updated successfully, but these errors were encountered: