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
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cos/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,15 @@ tape( 'the function returns `NaN` if provided a `-infinity`', function test( t )
t.equal( isnan( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var v;

v = cos( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = cos( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cos/test/test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,15 @@ tape( 'the function returns `NaN` if provided a `-infinity`', opts, function tes
t.equal( isnan( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var v;

v = cos( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = cos( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});
10 changes: 8 additions & 2 deletions lib/node_modules/@stdlib/math/base/special/cosh/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,15 @@ tape( 'the function computes the hyperbolic cosine (large values)', function tes
t.end();
});

tape( 'the function returns `1` if provided `0`', function test( t ) {
var v = cosh( 0 );
tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var v;

v = cosh( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = cosh( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,15 @@ tape( 'the function computes the hyperbolic cosine (large values)', opts, functi
t.end();
});

tape( 'the function returns `1` if provided `0`', opts, function test( t ) {
var v = cosh( 0 );
tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var v;

v = cosh( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = cosh( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});

Expand Down
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cospi/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
t.end();
});

tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var y;

y = cospi( -0.0 );
t.equal( y, 1.0, 'returns expected value' );

y = cospi( +0.0 );
t.equal( y, 1.0, 'returns expected value' );

t.end();
});

tape( 'if provided an integer, the function returns `+-1.0`', function test( t ) {
var expected;
var x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ tape( 'if provided `NaN`, the function returns `NaN`', opts, function test( t )
t.end();
});

tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var y;

y = cospi( -0.0 );
t.equal( y, 1.0, 'returns expected value' );

y = cospi( +0.0 );
t.equal( y, 1.0, 'returns expected value' );

t.end();
});

tape( 'if provided an integer, the function returns `+-1.0`', opts, function test( t ) {
var expected;
var x;
Expand Down
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/exp/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,15 @@ tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) {
t.equal( isnan( val ), true, 'returns NaN' );
t.end();
});

tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var val;

val = exp( -0.0 );
t.equal( val, 1.0, 'returns expected value' );

val = exp( +0.0 );
t.equal( val, 1.0, 'returns expected value' );

t.end();
});
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/exp/test/test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,15 @@ tape( 'the function returns `NaN` if provided a `NaN`', opts, function test( t )
t.equal( isnan( val ), true, 'returns NaN' );
t.end();
});

tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var val;

val = exp( -0.0 );
t.equal( val, 1.0, 'returns expected value' );

val = exp( +0.0 );
t.equal( val, 1.0, 'returns expected value' );

t.end();
});
12 changes: 9 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/exp10/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,15 @@ tape( 'the function returns `+infinity` if provided `+infinity`', function test(
t.end();
});

tape( 'the function returns `1` if provided `0`', function test( t ) {
var v = exp10( 0.0 );
t.equal( v, 1.0, 'equals 1' );
tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var val;

val = exp10( -0.0 );
t.equal( val, 1.0, 'returns expected value' );

val = exp10( +0.0 );
t.equal( val, 1.0, 'returns expected value' );

t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,15 @@ tape( 'the function returns `+infinity` if provided `+infinity`', opts, function
t.end();
});

tape( 'the function returns `1` if provided `0`', opts, function test( t ) {
var v = exp10( 0.0 );
t.equal( v, 1.0, 'equals 1' );
tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var val;

val = exp10( -0.0 );
t.equal( val, 1.0, 'returns expected value' );

val = exp10( +0.0 );
t.equal( val, 1.0, 'returns expected value' );

t.end();
});

Expand Down
12 changes: 9 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/exp2/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,15 @@ tape( 'the function returns `+infinity` if provided `+infinity`', function test(
t.end();
});

tape( 'the function returns `1` if provided `0`', function test( t ) {
var v = exp2( 0.0 );
t.equal( v, 1.0, 'equals 1' );
tape( 'the function returns `1` if provided `+-0`', function test( t ) {
var v;

v = exp2( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = exp2( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,15 @@ tape( 'the function returns `+infinity` if provided `+infinity`', opts, function
t.end();
});

tape( 'the function returns `1` if provided `0`', opts, function test( t ) {
var v = exp2( 0.0 );
t.equal( v, 1.0, 'equals 1' );
tape( 'the function returns `1` if provided `+-0`', opts, function test( t ) {
var v;

v = exp2( -0.0 );
t.equal( v, 1.0, 'returns expected value' );

v = exp2( +0.0 );
t.equal( v, 1.0, 'returns expected value' );

t.end();
});

Expand Down