If It Floats
TL;DR:
For any positive, finite float a and b, there is a positive finite float c such that: And here, we're content with the left-hand "infinity" being equal to the right-hand "infinity", even though that seemingly implies a = b. For further funnies, note that float Infinity = Infinity doesn't imply Infinity - Infinity = 0; that's a NaN.
Longer Read:
Instead, if the result can’t be represented by the data type, the operation will return a special value of ± Infinity or NaN . Because NaN is not a number, it is always true: JavaScript inherits the syntax of Boolean expressions from C. Because of this, in JavaScript, NaN is always false ( demo ): But enough with floats!
Related Skills:
JavaScript
💬 0 comments