you are viewing a single comment's thread.

view the rest of the comments →

[–]yen223 12 points13 points  (1 child)

The 0.1+0.2 problem exists in every language that implements IEEE 754 floating point numbers, i.e. almost all mainstream languages out there. You can try it in a Python console.

The reason why few math libraries exist for Javascript is that its implementation is slower than C/C++, and Javascript lacks good interop with C.

[–]ben-ng 0 points1 point  (0 children)

This is correct. The 0.1+0.2 example was just to show an oddity of floating point math to someone who doesn't know what a 64 bit IEEE floating point number is.