Skip to content

Commit f7db171

Browse files
test: add tests for IEEE 754-2019 compliance
PR-URL: #6564 Ref: #365 Reviewed-by: Athan Reines <[email protected]>
1 parent 05a7000 commit f7db171

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/node_modules/@stdlib/math/base/special/acosh/test/test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var randu = require( '@stdlib/random/base/randu' );
2626
var EPS = require( '@stdlib/constants/float64/eps' );
27+
var PINF = require( '@stdlib/constants/float64/pinf' );
2728
var abs = require( '@stdlib/math/base/special/abs' );
2829
var acosh = require( './../lib' );
2930

@@ -156,3 +157,9 @@ tape( 'the function returns `NaN` if provided value less than `1`', function tes
156157
}
157158
t.end();
158159
});
160+
161+
tape( 'the function returns `+infinity` if provided `+infinity`', function test( t ) {
162+
var v = acosh( PINF );
163+
t.equal( v, PINF, 'returns expected value' );
164+
t.end();
165+
});

lib/node_modules/@stdlib/math/base/special/acosh/test/test.native.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var randu = require( '@stdlib/random/base/randu' );
27+
var PINF = require( '@stdlib/constants/float64/pinf' );
2728
var EPS = require( '@stdlib/constants/float64/eps' );
2829
var abs = require( '@stdlib/math/base/special/abs' );
2930
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -165,3 +166,9 @@ tape( 'the function returns `NaN` if provided value less than `1`', opts, functi
165166
}
166167
t.end();
167168
});
169+
170+
tape( 'the function returns `+infinity` if provided `+infinity`', opts, function test( t ) {
171+
var v = acosh( PINF );
172+
t.equal( v, PINF, 'returns expected value' );
173+
t.end();
174+
});

0 commit comments

Comments
 (0)