3 ms·
This is happening because all numbers in JavaScript are IEEE 754 [0] double. +/-infinite may be returned for finite, non zero number divided by zero. This is al
by mbel 13y ago
This is happening because all numbers in JavaScript are IEEE 754 [0] double. +/-infinite may be returned for finite, non zero number divided by zero. This is also common behavior in many other languages with support for IEEE 754 floats, from the top of my head: JVM, .NET languages and Haskell do so too.
[0] http://en.wikipedia.org/wiki/IEEE_754 http://en.wikipedia.org/wiki/IEEE_754