Single-precision floating-point mathematical constants.
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we’ve built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]
Single-precision floating-point mathematical constants.
bash
npm install @stdlib/constants-float32
script
tag without installation and bundlers, use the [ES Module][es-module] available on the [esm
][esm-url] branch (see [README][esm-readme]).deno
][deno-url] branch (see [README][deno-readme] for usage intructions).umd
][umd-url] branch (see [README][umd-readme]).javascript
var constants = require( '@stdlib/constants-float32' );
javascript
var c = constants;
// returns {...}
ABS_MASK
][@stdlib/constants/float32/abs-mask]: mask for excluding the sign bit of a single-precision floating-point number.CBRT_EPS
][@stdlib/constants/float32/cbrt-eps]: cube root of single-precision floating-point epsilon.E
][@stdlib/constants/float32/e]: the mathematical constant e.EPS
][@stdlib/constants/float32/eps]: difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.EXPONENT_BIAS
][@stdlib/constants/float32/exponent-bias]: the bias of a single-precision floating-point number’s exponent.EXPONENT_MASK
][@stdlib/constants/float32/exponent-mask]: mask for the exponent of a single-precision floating-point number.FOURTH_PI
][@stdlib/constants/float32/fourth-pi]: one fourth times the mathematical constant π.HALF_LN_TWO
][@stdlib/constants/float32/half-ln-two]: one half times the natural logarithm of 2
as a single-precision floating-point number.HALF_PI
][@stdlib/constants/float32/half-pi]: one half times the mathematical constant π.LN_HALF
][@stdlib/constants/float32/ln-half]: natural logarithm of 1/2
as a single-precision floating-point number.LN_PI
][@stdlib/constants/float32/ln-pi]: natural logarithm of the mathematical constant π as a single-precision floating-point number.LN_TEN
][@stdlib/constants/float32/ln-ten]: natural logarithm of 10
as a single-precision floating-point number.LN_TWO
][@stdlib/constants/float32/ln-two]: natural logarithm of 2
as a single-precision floating-point number.MAX_BASE10_EXPONENT_SUBNORMAL
][@stdlib/constants/float32/max-base10-exponent-subnormal]: the maximum base 10 exponent for a subnormal single-precision floating-point number.MAX_BASE10_EXPONENT
][@stdlib/constants/float32/max-base10-exponent]: the maximum base 10 exponent for a single-precision floating-point number.MAX_BASE2_EXPONENT_SUBNORMAL
][@stdlib/constants/float32/max-base2-exponent-subnormal]: the maximum biased base 2 exponent for a subnormal single-precision floating-point number.MAX_BASE2_EXPONENT
][@stdlib/constants/float32/max-base2-exponent]: the maximum biased base 2 exponent for a single-precision floating-point number.MAX_SAFE_FIBONACCI
][@stdlib/constants/float32/max-safe-fibonacci]: maximum safe Fibonacci number when stored in single-precision floating-point format.MAX_SAFE_INTEGER
][@stdlib/constants/float32/max-safe-integer]: maximum safe single-precision floating-point integer.MAX_SAFE_NTH_FACTORIAL
][@stdlib/constants/float32/max-safe-nth-factorial]: maximum safe nth factorial when stored in single-precision floating-point format.MAX_SAFE_NTH_FIBONACCI
][@stdlib/constants/float32/max-safe-nth-fibonacci]: maximum safe nth Fibonacci number when stored in single-precision floating-point format.MAX_SAFE_NTH_LUCAS
][@stdlib/constants/float32/max-safe-nth-lucas]: maximum safe nth Lucas number when stored in single-precision floating-point format.MAX
][@stdlib/constants/float32/max]: maximum single-precision floating-point number.MIN_BASE10_EXPONENT_SUBNORMAL
][@stdlib/constants/float32/min-base10-exponent-subnormal]: the minimum base 10 exponent for a subnormal single-precision floating-point number.MIN_BASE10_EXPONENT
][@stdlib/constants/float32/min-base10-exponent]: the minimum base 10 exponent for a normal single-precision floating-point number.MIN_BASE2_EXPONENT_SUBNORMAL
][@stdlib/constants/float32/min-base2-exponent-subnormal]: the minimum biased base 2 exponent for a subnormal single-precision floating-point number.MIN_BASE2_EXPONENT
][@stdlib/constants/float32/min-base2-exponent]: the minimum biased base 2 exponent for a normal single-precision floating-point number.MIN_SAFE_INTEGER
][@stdlib/constants/float32/min-safe-integer]: minimum safe single-precision floating-point integer.NAN
][@stdlib/constants/float32/nan]: single-precision floating-point NaN
.NINF
][@stdlib/constants/float32/ninf]: single-precision floating-point negative infinity.NUM_BYTES
][@stdlib/constants/float32/num-bytes]: size (in bytes) of a single-precision floating-point number.PHI
][@stdlib/constants/float32/phi]: golden ratio.PI
][@stdlib/constants/float32/pi]: the mathematical constant π.PINF
][@stdlib/constants/float32/pinf]: single-precision floating-point positive infinity.PRECISION
][@stdlib/constants/float32/precision]: effective number of bits in the significand of a single-precision floating-point number.SIGN_MASK
][@stdlib/constants/float32/sign-mask]: mask for the sign bit of a single-precision floating-point number.SIGNIFICAND_MASK
][@stdlib/constants/float32/significand-mask]: mask for the significand of a single-precision floating-point number.SMALLEST_NORMAL
][@stdlib/constants/float32/smallest-normal]: smallest positive normalized single-precision floating-point number.SMALLEST_SUBNORMAL
][@stdlib/constants/float32/smallest-subnormal]: smallest positive denormalized single-precision floating-point number.SQRT_EPS
][@stdlib/constants/float32/sqrt-eps]: square root of single-precision floating-point epsilon.SQRT_HALF_PI
][@stdlib/constants/float32/sqrt-half-pi]: square root of the mathematical constant π divided by 2 as a single-precision floating-point number.SQRT_HALF
][@stdlib/constants/float32/sqrt-half]: square root of 1/2
as a single-precision floating-point number.SQRT_PHI
][@stdlib/constants/float32/sqrt-phi]: square root of the Golden ratio (φ) as a single-precision floating-point number.SQRT_PI
][@stdlib/constants/float32/sqrt-pi]: square root of the mathematical constant π as a single-precision floating-point number.SQRT_THREE
][@stdlib/constants/float32/sqrt-three]: square root of 3
as a single-precision floating-point number.SQRT_TWO_PI
][@stdlib/constants/float32/sqrt-two-pi]: square root of the mathematical constant π times 2 as a single-precision floating-point number.SQRT_TWO
][@stdlib/constants/float32/sqrt-two]: square root of 2
as a single-precision floating-point number.TWO_PI
][@stdlib/constants/float32/two-pi]: the mathematical constant π times 2.javascript
var objectKeys = require( '@stdlib/utils-keys' );
var constants = require( '@stdlib/constants-float32' );
console.log( objectKeys( constants ) );