|
|
|
|
|
by chris_wot
5092 days ago
|
|
No, no it's not. It's actually part of ECMA-262. Javascript allows numbers to be a number, NaN or positive/negative infinity. It is well specified within the spec that "Division of a nonzero finite value by a zero results in a signed infinity. The sign is determined by the rule already stated above." [1] Before you get your knickers in a twist, this is compliant with IEEE 754; although the IEEE define it as an exception. 1. ECMA-262, pg 74, "11.5.2 Applying the / Operator" |
|