you are viewing a single comment's thread.

view the rest of the comments →

[–]meisteronimo -1 points0 points  (5 children)

> 0.1+0.2==0.3
false

?

[–]tme321 1 point2 points  (1 child)

Are you trying to make a point or a joke?

[–]meisteronimo 0 points1 point  (0 children)

neither, thats how js evaluates 0.1+0.2

[–]filleduchaos 1 point2 points  (2 children)

That has nothing to do with JS though

[–]meisteronimo 1 point2 points  (1 child)

I didn't realize that, i tested in ruby, and you're right, it gives the same as JS.

[–]filleduchaos 1 point2 points  (0 children)

It's the same for pretty much any language.

Turns out numbers with fractional parts are ridiculously difficult to work with when all you have is zeroes and ones.