Re:Evil.js: A JavaScript library for thwarting hot-linkers
by mbel on Monday March 31, 2014 @01:03PM
(#7502688)
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