time-to-botec/js/node_modules/@stdlib/math/base/assert/is-infinite/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

1.6 KiB

isInfinite

Test if a double-precision floating-point numeric value is infinite.

Usage

var isInfinite = require( '@stdlib/math/base/assert/is-infinite' );

isInfinite( x )

Tests if a double-precision floating-point numeric value is infinite.

var bool = isInfinite( Infinity );
// returns true

bool = isInfinite( -Infinity );
// returns true

Examples

var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var isInfinite = require( '@stdlib/math/base/assert/is-infinite' );

var bool = isInfinite( PINF );
// returns true

bool = isInfinite( NINF );
// returns true

bool = isInfinite( 5.0 );
// returns false

bool = isInfinite( NaN );
// returns false