Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Aug 24, 2024
1 parent 0f5ff7c commit 7c88dd4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ A total of 3 people contributed to this release. Thank you to the following cont

<details>

- [`0ab9fc7`](https://github.com/stdlib-js/stdlib/commit/0ab9fc7de86012c670189711b6c6627b41119537) - **test:** add and modify tests [(#2830)](https://github.com/stdlib-js/stdlib/pull/2830) _(by Gunj Joshi)_
- [`16c19b6`](https://github.com/stdlib-js/stdlib/commit/16c19b67c7452b3ae9755cc7ef2a5d2540ab1cf9) - **feat:** add `math/base/special/xlogyf` [(#2813)](https://github.com/stdlib-js/stdlib/pull/2813) _(by Gunj Joshi)_
- [`71c43cf`](https://github.com/stdlib-js/stdlib/commit/71c43cf5165749e2ce2647cb52d92f6c97f16959) - **feat:** add `math/base/special/ldexpf` _(by Gunj Joshi, Philipp Burckhardt)_
- [`6c8f019`](https://github.com/stdlib-js/stdlib/commit/6c8f019db8adb12466250957693edb9830496a7b) - **feat:** add `math/base/special/logf` _(by Gunj Joshi, Philipp Burckhardt)_
Expand Down
20 changes: 10 additions & 10 deletions base/special/maxabs/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) {
var v;

v = maxabs( NaN, 3.14 );
t.strictEqual( isnan( v ), true, 'returns NaN' );
t.strictEqual( isnan( v ), true, 'returns expected value' );

v = maxabs( 3.14, NaN );
t.strictEqual( isnan( v ), true, 'returns NaN' );
t.strictEqual( isnan( v ), true, 'returns expected value' );

v = maxabs( NaN );
t.strictEqual( isnan( v ), true, 'returns NaN' );
v = maxabs( NaN, NaN );
t.strictEqual( isnan( v ), true, 'returns expected value' );

t.end();
});
Expand All @@ -54,10 +54,10 @@ tape( 'the function returns `+Infinity` if provided `+Infinity`', function test(
var v;

v = maxabs( PINF, 3.14 );
t.strictEqual( v, PINF, 'returns +infinity' );
t.strictEqual( v, PINF, 'returns expected value' );

v = maxabs( 3.14, PINF );
t.strictEqual( v, PINF, 'returns +infinity' );
t.strictEqual( v, PINF, 'returns expected value' );

t.end();
});
Expand All @@ -66,16 +66,16 @@ tape( 'the function returns a correctly signed zero', function test( t ) {
var v;

v = maxabs( +0.0, -0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( -0.0, +0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( -0.0, -0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( +0.0, +0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

t.end();
});
Expand Down
33 changes: 21 additions & 12 deletions base/special/maxabs/test/test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,25 @@ tape( 'the function returns `NaN` if provided a `NaN`', opts, function test( t )
var v;

v = maxabs( NaN, 3.14 );
t.strictEqual( isnan( v ), true, 'returns NaN' );
t.strictEqual( isnan( v ), true, 'returns expected value' );

v = maxabs( 3.14, NaN );
t.strictEqual( isnan( v ), true, 'returns NaN' );
t.strictEqual( isnan( v ), true, 'returns expected value' );

v = maxabs( NaN, NaN );
t.strictEqual( isnan( v ), true, 'returns expected value' );

t.end();
});

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

v = maxabs( PINF, 3.14 );
t.strictEqual( v, PINF, 'returns expected value' );

v = maxabs( 3.14, PINF );
t.strictEqual( v, PINF, 'returns expected value' );

t.end();
});
Expand All @@ -60,16 +75,16 @@ tape( 'the function returns a correctly signed zero', opts, function test( t ) {
var v;

v = maxabs( +0.0, -0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( -0.0, +0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( -0.0, -0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

v = maxabs( +0.0, +0.0 );
t.strictEqual( isPositiveZero( v ), true, 'returns +0' );
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );

t.end();
});
Expand All @@ -83,11 +98,5 @@ tape( 'the function returns the maximum absolute value', opts, function test( t
v = maxabs( -4.2, 3.14 );
t.strictEqual( v, 4.2, 'returns expected value' );

v = maxabs( PINF, 3.14 );
t.strictEqual( v, PINF, 'returns expected value' );

v = maxabs( 3.14, PINF );
t.strictEqual( v, PINF, 'returns expected value' );

t.end();
});

0 comments on commit 7c88dd4

Please sign in to comment.