Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPS = require( '@stdlib/constants/float64/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var rsqrt = require( './../lib' );


Expand Down Expand Up @@ -241,7 +242,7 @@ tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {

tape( 'the function returns `0.0` if provided `+infinity`', function test( t ) {
var v = rsqrt( PINF );
t.equal( v, 0.0, 'returns expected value' );
t.equal( isPositiveZero( v ), true, 'returns expected value' );
t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPS = require( '@stdlib/constants/float64/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var tryRequire = require( '@stdlib/utils/try-require' );


Expand Down Expand Up @@ -250,7 +251,7 @@ tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {

tape( 'the function returns `0.0` if provided `+infinity`', opts, function test( t ) {
var v = rsqrt( PINF );
t.equal( v, 0.0, 'returns expected value' );
t.equal( isPositiveZero( v ), true, 'returns expected value' );
t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var PINF = require( '@stdlib/constants/float32/pinf' );
var NINF = require( '@stdlib/constants/float32/ninf' );
var EPS = require( '@stdlib/constants/float32/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var rsqrtf = require( './../lib' );


Expand Down Expand Up @@ -241,7 +242,7 @@ tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {

tape( 'the function returns `0.0` if provided `+infinity`', function test( t ) {
var v = rsqrtf( PINF );
t.equal( v, 0.0, 'returns expected value' );
t.equal( isPositiveZero( v ), true, 'returns expected value' );
t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var PINF = require( '@stdlib/constants/float32/pinf' );
var NINF = require( '@stdlib/constants/float32/ninf' );
var EPS = require( '@stdlib/constants/float32/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var tryRequire = require( '@stdlib/utils/try-require' );


Expand Down Expand Up @@ -250,7 +251,7 @@ tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {

tape( 'the function returns `0.0` if provided `+infinity`', opts, function test( t ) {
var v = rsqrtf( PINF );
t.equal( v, 0.0, 'returns expected value' );
t.equal( isPositiveZero( v ), true, 'returns expected value' );
t.end();
});

Expand Down