time-to-botec/js/node_modules/@stdlib/math/base/assert/is-finite/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.7 KiB

isfinite

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

Usage

var isfinite = require( '@stdlib/math/base/assert/is-finite' );

isfinite( x )

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

var bool = isfinite( 3.14 );
// returns true

bool = isfinite( Infinity );
// returns false

bool = isfinite( -Infinity );
// returns false

bool = isfinite( NaN );
// returns false

Examples

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

var bool = isfinite( 5.0 );
// returns true

bool = isfinite( -2.0e64 );
// returns true

bool = isfinite( PINF );
// returns false

bool = isfinite( NINF );
// returns false

bool = isfinite( NaN );
// returns false