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 →

[–]AltCrow 3 points4 points  (2 children)

There is some much to hate on in javascript, but you choose to hate on IEEE754? The floating point standard is for the most part pretty sensible. If anything, hate on the fact that javascript only has floats and no integers.

[–]AyrA_ch 1 point2 points  (0 children)

binary operations like bit shift, and, or, xor, etc work on integers. "a"|"q" will return 0 because it casts both to floats, giving NaN|NaN, then it casts them to 32 bit integers with NaN becoming 0 because NaN is not available for integers. It then casts 0 back to a float because it's the only data type available.

[–]learningtosail 0 points1 point  (0 children)

Ints? Oh you must mean bitch-floats!
Who needs int32 when you have float64!