2 ms·
https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems https://en.wikipedia.org/wiki/Floating_point#Accuracy_proble... It is the same as trying to stor
by dbaupp 14y ago
https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems https://en.wikipedia.org/wiki/Floating_point#Accuracy_proble...
It is the same as trying to store 1/3 = 0.333... as a finite decimal. Basically, a floating point number only has a finite space to put the component after the decimal point, so it gets truncated and made inaccurate, just like truncating 1/3 to 0.3333 will mean that calculations become wrong: 3*0.3333 = 0.9999 ≠ 1.
- Xcelerate 14y agoAh, ok. Thank you. This isn't a problem for me then. It appears to be just typical floating-point math. I was thinking perhaps JavaScript did something else weird that I didn't know about.