API / Core / Math / Constants

Constants

Mathematical Constants

e

RESCRIPT
let e: float

Math.Constants.e returns Euler's number, ≈ 2.718281828459045. See Math.E on MDN.

Examples

RESCRIPT
Math.Constants.e

ln2

RESCRIPT
let ln2: float

Math.Constants.ln2 returns Natural logarithm of 2, ≈ 0.6931471805599453. See Math.LN2 on MDN.

Examples

RESCRIPT
Math.Constants.ln2

ln10

RESCRIPT
let ln10: float

Math.Constants.ln10 returns Natural logarithm of 10, ≈ 2.302585092994046. See Math.LN10 on MDN.

Examples

RESCRIPT
Math.Constants.ln10

log2e

RESCRIPT
let log2e: float

Math.Constants.log2e returns Base 2 logarithm of E, ≈ 1.4426950408889634. See Math.LOG2E on MDN.

Examples

RESCRIPT
Math.Constants.log2e

log10e

RESCRIPT
let log10e: float

Math.Constants.log10e returns Base 10 logarithm of E, ≈ 0.4342944819032518. See Math.LOG10E on MDN.

Examples

RESCRIPT
Math.Constants.log10e

pi

RESCRIPT
let pi: float

Math.Constants.pi returns Pi - ratio of the circumference to the diameter of a circle, ≈ 3.141592653589793. See Math.PI on MDN.

Examples

RESCRIPT
Math.Constants.pi

sqrt1_2

RESCRIPT
let sqrt1_2: float

Math.Constants.sqrt1_2 returns Square root of 1/2, ≈ 0.7071067811865476. See Math.SQRT1_2 on MDN.

Examples

RESCRIPT
Math.Constants.sqrt1_2

sqrt2

RESCRIPT
let sqrt2: float

Math.Constants.e returns Absolute value for integer argument. See Math.abs on MDN.

Examples

RESCRIPT
Math.Constants.sqrt2