mathjs/docs/constants.md

396 B

Constants

Math.js has the following built-in constants.

  • math.E, math.e
  • math.i
  • math.Infinity
  • math.LN2
  • math.LN10
  • math.LOG2E
  • math.LOG10E
  • math.NaN
  • math.PI, math.pi
  • math.SQRT1_2
  • math.SQRT2
  • math.tau
  • math.phi, golden ratio
  • math.version, version number of math.js

Example usage:

math.sin(math.pi / 4);          // 0.70711
math.multiply(math.i, math.i);  // -1