Skip to content

Commit a60fc25

Browse files
authored
test: use powf in absgammaInf
PR-URL: stdlib-js#10437 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 0c1fea4 commit a60fc25

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var tape = require( 'tape' );
2424
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2525
var lnf = require( '@stdlib/math/base/special/lnf' );
26-
var pow = require( '@stdlib/math/base/special/pow' );
26+
var powf = require( '@stdlib/math/base/special/powf' );
2727
var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' );
2828
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2929
var PINF = require( '@stdlib/constants/float32/pinf' );
@@ -68,11 +68,10 @@ tape( 'the function returns `+infinity` when provided `0`', function test( t ) {
6868
});
6969

7070
tape( 'the function returns `+infinity` for x smaller than or equal to `-2^23`', function test( t ) {
71-
// TODO: Replace with `powf` once available:
72-
var v = absgammalnf( f32( -pow( 2.0, 23 ) ) );
71+
var v = absgammalnf( f32( -powf( 2.0, 23 ) ) );
7372
t.strictEqual( v, PINF, 'returns expected value' );
7473

75-
v = absgammalnf( f32( -pow( 2.0, 24 ) ) );
74+
v = absgammalnf( f32( -powf( 2.0, 24 ) ) );
7675
t.strictEqual( v, PINF, 'returns expected value' );
7776

7877
t.end();
@@ -130,8 +129,7 @@ tape( 'the function evaluates the natural logarithm of the gamma function for x
130129
var x;
131130
var v;
132131

133-
// TODO: Replace with `powf` once available:
134-
x = f32( pow( 2.0, 27 ) );
132+
x = f32( powf( 2.0, 27 ) );
135133
v = absgammalnf( x );
136134
expected = f32( x * f32( lnf( x ) - f32( 1.0 ) ) );
137135
t.strictEqual( v, expected, 'returns expected value' );

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
2525
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2626
var lnf = require( '@stdlib/math/base/special/lnf' );
27-
var pow = require( '@stdlib/math/base/special/pow' );
27+
var powf = require( '@stdlib/math/base/special/powf' );
2828
var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' );
2929
var f32 = require( '@stdlib/number/float64/base/to-float32' );
3030
var PINF = require( '@stdlib/constants/float32/pinf' );
@@ -77,11 +77,10 @@ tape( 'the function returns `+infinity` when provided `0`', opts, function test(
7777
});
7878

7979
tape( 'the function returns `+infinity` for x smaller than or equal to `-2^23`', opts, function test( t ) {
80-
// TODO: Replace with `powf` once available:
81-
var v = absgammalnf( f32( -pow( 2.0, 23 ) ) );
80+
var v = absgammalnf( f32( -powf( 2.0, 23 ) ) );
8281
t.strictEqual( v, PINF, 'returns expected value' );
8382

84-
v = absgammalnf( f32( -pow( 2.0, 24 ) ) );
83+
v = absgammalnf( f32( -powf( 2.0, 24 ) ) );
8584
t.strictEqual( v, PINF, 'returns expected value' );
8685

8786
t.end();
@@ -139,8 +138,7 @@ tape( 'the function evaluates the natural logarithm of the absolute value of the
139138
var x;
140139
var v;
141140

142-
// TODO: Replace with `powf` once available:
143-
x = f32( pow( 2.0, 27 ) );
141+
x = f32( powf( 2.0, 27 ) );
144142
v = absgammalnf( x );
145143
expected = f32( x * f32( lnf( x ) - f32( 1.0 ) ) );
146144
t.strictEqual( v, expected, 'returns expected value' );

0 commit comments

Comments
 (0)