What is @stdlib/constants-float64-pinf?
@stdlib/constants-float64-pinf is a package that provides a constant representing positive infinity for double-precision floating-point numbers (float64). This can be useful in various mathematical computations and comparisons where positive infinity is a meaningful value.
What are @stdlib/constants-float64-pinf's main functionalities?
Accessing Positive Infinity
This feature allows you to access the positive infinity constant directly from the package. It can be used in mathematical operations where positive infinity is required.
const PINF = require('@stdlib/constants-float64-pinf');
console.log(PINF); // Output: Infinity
Comparisons with Positive Infinity
This feature demonstrates how to use the positive infinity constant in comparisons. It can be useful for checking if a value has overflowed to positive infinity.
const PINF = require('@stdlib/constants-float64-pinf');
const value = 1e308 * 2;
console.log(value === PINF); // Output: true
Other packages similar to @stdlib/constants-float64-pinf
math-constants
The 'math-constants' package includes a variety of mathematical constants, such as Pi, Euler's number, and positive infinity. It is more comprehensive compared to @stdlib/constants-float64-pinf, which focuses solely on the positive infinity constant.
Positive Infinity
Double-precision floating-point positive infinity.
Installation
npm install @stdlib/constants-float64-pinf
Usage
var FLOAT64_PINF = require( '@stdlib/constants-float64-pinf' );
FLOAT64_PINF
Double-precision floating-point positive infinity.
var bool = ( FLOAT64_PINF === Infinity );
Examples
var FLOAT64_PINF = require( '@stdlib/constants-float64-pinf' );
console.log( FLOAT64_PINF );
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.
License
See LICENSE.
Copyright
Copyright © 2016-2021. The Stdlib Authors.
0.0.3 (2021-06-16)
No changes reported for this release.
</section>
<!-- /.release -->
<section class="release" id="v0.0.2">