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

isfinitef

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

Usage

var isfinitef = require( '@stdlib/math/base/assert/is-finitef' );

isfinitef( x )

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

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

bool = isfinitef( Infinity );
// returns false

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

bool = isfinitef( NaN );
// returns false

Examples

var PINF = require( '@stdlib/constants/float32/pinf' );
var NINF = require( '@stdlib/constants/float32/ninf' );
var isfinitef = require( '@stdlib/math/base/assert/is-finitef' );

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

bool = isfinitef( -2.0e32 );
// returns true

bool = isfinitef( PINF );
// returns false

bool = isfinitef( NINF );
// returns false

bool = isfinitef( NaN );
// returns false