项目作者: stdlib-js

项目描述 :
Single-precision floating-point mathematical constants.
高级语言: Makefile
项目地址: git://github.com/stdlib-js/constants-float32.git
创建时间: 2021-06-15T18:08:01Z
项目社区:https://github.com/stdlib-js/constants-float32

开源协议:Apache License 2.0

下载




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][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]

Single-precision floating-point mathematical constants.



## Installation

bash npm install @stdlib/constants-float32

Alternatively,

- To load the package in a website via a script tag without installation and bundlers, use the [ES Module][es-module] available on the [esm][esm-url] branch (see [README][esm-readme]).
- If you are using Deno, visit the [deno][deno-url] branch (see [README][deno-readme] for usage intructions).
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [umd][umd-url] branch (see [README][umd-readme]).

The [branches.md][branches-url] file summarizes the available branches and displays a diagram illustrating their relationships.

To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.



## Usage

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

#### constants

Single-precision floating-point mathematical constants.

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.







## Examples





javascript var objectKeys = require( '@stdlib/utils-keys' ); var constants = require( '@stdlib/constants-float32' ); console.log( objectKeys( constants ) );



*

## Notice

This package is part of [stdlib][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][stdlib], see the main project [repository][stdlib].

#### Community

[![Chat][chat-image]][chat-url]

—-

## License

See [LICENSE][stdlib-license].


## Copyright

Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].