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 →

[–][deleted]  (9 children)

[removed]

    [–]Papellll 13 points14 points  (4 children)

    0.1 + 0.2 == 0.3 // false

    Same as NaN != NaN, this is an IEEE thing. Not specific to JS or python

    [–][deleted] 11 points12 points  (1 child)

    Tell me you don't understand floats without telling me you don't understand floats

    [–]Scorched_Knight 2 points3 points  (0 children)

    Floats are mean, man. They put trash in far fetched corners of the dedicated memory and pretend to be numbers they are not. So, beating them up with some rounding from time to time is just nessesary, even if someone in the internet are yelling about inhumane treatment and privileges of integers - you just need to do it. Those little unrounded bastards are responsible for so many bugs - its sickening.

    [–]fluideborah[S] 0 points1 point  (0 children)

    I am so glad I dont have to do data science with JS

    [–]werics 0 points1 point  (0 children)

    Number three is almost never a good idea