Skip to content

Latest commit

 

History

History
104 lines (62 loc) · 2.33 KB

File metadata and controls

104 lines (62 loc) · 2.33 KB

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

See Also