10.4.1 Special Numbers

The math library has definitions for several special numbers:

  • NaN (Not a Number): returned when a mathematically incorrect operation is executed, e.g. Math.sqrt(-1)
  • POSITIVE_INFINITY: e.g. divide a positive number by zero
  • NEGATIVE_INFINITY: e.g. divide a negative number by zero
  • PI : 3.1415...