1/0 = Infinity - ΩJr. Software Articles and Products

This information lives on a web page hosted at the following web address: 'https://omegajunior.globat.com/code/'.

Normally, when dividing any number by 0 (zero), computer applications throw an error. After all, multiplying any number with 0 returns 0, thus the opposite does not compute.

A.E.Veltstra
Monday, May 17, 2010

Except for the javascript parser in Internet Explorer 8. It returns 'Infinity'. Which, mathematically, is correct.

However, it's quite difficult to calculate with Infinity, and personally I did not expect a javascript parser to wield that kind of power.

Thus, my fellow javascript authors, we shall adjust our scripts:
if (typeof Infinity === "undefined") {
var Infinity = 1/0;
}


Cute?

Maybe.

I wonder who expected this behaviour, though.

Need problem solving?

Talk to me. Let's meet for coffee or over lunch. Mail me at “omegajunior at protonmail dot com”.