@stdlib/constants-float64
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published
About stdlib...

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!

Constants

NPM version Build Status Coverage Status

Double-precision floating-point mathematical constants.

Installation

npm install @stdlib/constants-float64

Usage

var constants = require( '@stdlib/constants-float64' );

constants

Double-precision floating-point mathematical constants.

var c = constants;
// returns {...}
  • APERY: Apéry's constant.
  • CATALAN: Catalan's constant.
  • CBRT_EPS: cube root of double-precision floating-point epsilon.
  • E: the mathematical constant e.
  • EPS: difference between one and the smallest value greater than one that can be represented as a double-precision floating-point number.
  • EULERGAMMA: the Euler-Mascheroni constant.
  • EXPONENT_BIAS: the bias of a double-precision floating-point number's exponent.
  • FOURTH_PI: one fourth times the mathematical constant π.
  • FOURTH_ROOT_EPS: fourth root of double-precision floating-point epsilon.
  • GAMMA_LANCZOS_G: arbitrary constant g to be used in Lanczos approximation functions.
  • GLAISHER: Glaisher-Kinkelin constant.
  • HALF_LN2: one half times the natural logarithm of 2.
  • HALF_PI: one half times the mathematical constant π.
  • HIGH_WORD_ABS_MASK: high word mask for excluding the sign bit of a double-precision floating-point number.
  • HIGH_WORD_EXPONENT_MASK: high word mask for the exponent of a double-precision floating-point number.
  • HIGH_WORD_SIGN_MASK: high word mask for the sign bit of a double-precision floating-point number.
  • HIGH_WORD_SIGNIFICAND_MASK: high word mask for the significand of a double-precision floating-point number.
  • LN_HALF: natural logarithm of 1/2.
  • LN_PI: natural logarithm of the mathematical constant π.
  • LN_SQRT_TWO_PI: natural logarithm of the square root of 2π.
  • LN10: natural logarithm of 10.
  • LN_TWO_PI: natural logarithm of .
  • LN2: natural logarithm of 2.
  • LOG10E: base 10 logarithm of the mathematical constant e.
  • LOG2E: base 2 logarithm of the mathematical constant e.
  • MAX_BASE10_EXPONENT_SUBNORMAL: the maximum base 10 exponent for a subnormal double-precision floating-point number.
  • MAX_BASE10_EXPONENT: the maximum base 10 exponent for a double-precision floating-point number.
  • MAX_BASE2_EXPONENT_SUBNORMAL: the maximum biased base 2 exponent for a subnormal double-precision floating-point number.
  • MAX_BASE2_EXPONENT: the maximum biased base 2 exponent for a double-precision floating-point number.
  • MAX_LN: natural logarithm of the maximum double-precision floating-point number.
  • MAX_SAFE_FIBONACCI: maximum safe Fibonacci number when stored in double-precision floating-point format.
  • MAX_SAFE_INTEGER: maximum safe double-precision floating-point integer.
  • MAX_SAFE_LUCAS: maximum safe Lucas number when stored in double-precision floating-point format.
  • MAX_SAFE_NTH_FIBONACCI: maximum safe nth Fibonacci number when stored in double-precision floating-point format.
  • MAX_SAFE_NTH_LUCAS: maximum safe nth Lucas number when stored in double-precision floating-point format.
  • MAX: maximum double-precision floating-point number.
  • MIN_BASE10_EXPONENT_SUBNORMAL: the minimum base 10 exponent for a subnormal double-precision floating-point number.
  • MIN_BASE10_EXPONENT: the minimum base 10 exponent for a normal double-precision floating-point number.
  • MIN_BASE2_EXPONENT_SUBNORMAL: the minimum biased base 2 exponent for a subnormal double-precision floating-point number.
  • MIN_BASE2_EXPONENT: the minimum biased base 2 exponent for a normal double-precision floating-point number.
  • MIN_LN: natural logarithm of the smallest normalized double-precision floating-point number.
  • MIN_SAFE_INTEGER: minimum safe double-precision floating-point integer.
  • NAN: double-precision floating-point NaN.
  • NINF: double-precision floating-point negative infinity.
  • NUM_BYTES: size (in bytes) of a double-precision floating-point number.
  • PHI: golden ratio.
  • PI_SQUARED: π².
  • PI: the mathematical constant π.
  • PINF: double-precision floating-point positive infinity.
  • PRECISION: effective number of bits in the significand of a double-precision floating-point number.
  • SMALLEST_NORMAL: smallest positive normalized double-precision floating-point number.
  • SMALLEST_SUBNORMAL: smallest positive denormalized double-precision floating-point number.
  • SQRT_EPS: square root of double-precision floating-point epsilon.
  • SQRT_HALF_PI: square root of the mathematical constant π divided by 2.
  • SQRT_HALF: square root of 1/2.
  • SQRT_PHI: square root of the Golden ratio (φ).
  • SQRT_PI: square root of the mathematical constant π.
  • SQRT_THREE: square root of 3.
  • SQRT_TWO_PI: square root of the mathematical constant π times 2.
  • SQRT_TWO: square root of 2.
  • TWO_PI: the mathematical constant π times 2.

Examples

var objectKeys = require( '@stdlib/utils-keys' );
var constants = require( '@stdlib/constants-float64' );

console.log( objectKeys( constants ) );

Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2024. The Stdlib Authors.

Package Sidebar

Install

npm i @stdlib/constants-float64

Homepage

stdlib.io

Weekly Downloads

2

Version

0.2.1

License

Apache-2.0

Unpacked Size

97.4 kB

Total Files

10

Last publish

Collaborators

  • stdlib-bot
  • kgryte
  • planeshifter
  • rreusser