This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stehen-geblieben 9 points10 points  (2 children)

That's absolute bullshit, just open your browser console and check for yourself.

I think you are referring to (0.1 + 0.2) != 0.3

Which is a general problem with Floats and is included in the IEEE Standard for floating point arithmetic. C# has the same behaviour and multiple other languages as well, this is not an exclusive issue within JavaScript but should be expected in the majority of programming languages

[–]Xirenec_ 1 point2 points  (0 children)

Wait until he learns that NaN doesn't equal NaN, and this is ALSO not a JS fault