isPositiveZero

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

Usage

var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );

isPositiveZero( x )

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

var bool = isPositiveZero( 0.0 );
// returns true

bool = isPositiveZero( -0.0 );
// returns false

Examples

var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );

var bool = isPositiveZero( 0.0 );
// returns true

bool = isPositiveZero( -0.0 );
// returns false

bool = isPositiveZero( 5.0 );
// returns false

bool = isPositiveZero( -1.0 );
// returns false

bool = isPositiveZero( NaN );
// returns false
Did you find this page helpful?