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.
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!
PINF
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-2023. The Stdlib Authors.
0.1.0 (2023-09-22)
<section class="features">
Features
56e6edf
- update minimum TypeScript version
</section>
<!-- /.features -->
<section class="breaking-changes">
BREAKING CHANGES
</section>
<!-- /.breaking-changes -->
<section class="commits">
Commits
<details>
56e6edf
- feat: update minimum TypeScript version (by Philipp Burckhardt)11b2b38
- test: use strictEqual checks (by Philipp Burckhardt)
</details>
</section>
<!-- /.commits -->
<section class="contributors">
Contributors
A total of 1 person contributed to this release. Thank you to this contributor:
</section>
<!-- /.contributors -->
</section>
<!-- /.release -->
<section class="release" id="v0.0.8">