Skip to content
Draft
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
17 changes: 3 additions & 14 deletions lib/node_modules/@stdlib/stats/incr/prod/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ var tape = require( 'tape' );
var zeros = require( '@stdlib/array/zeros' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPSILON = require( '@stdlib/constants/float64/eps' );
var normal = require( '@stdlib/random/base/normal' );
var randu = require( '@stdlib/random/base/randu' );
var ldexp = require( '@stdlib/math/base/special/ldexp' );
var abs = require( '@stdlib/math/base/special/abs' );
var isnan = require( '@stdlib/assert/is-nan' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var isEven = require( '@stdlib/math/base/assert/is-even' );
var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
Expand Down Expand Up @@ -131,8 +130,6 @@ tape( 'the accumulator function can return a result which overflows', function t

tape( 'overflow may be transient', function test( t ) {
var expected;
var delta;
var tol;
var acc;
var x;
var y;
Expand All @@ -150,10 +147,7 @@ tape( 'overflow may be transient', function test( t ) {
acc( y );
acc( z );

delta = abs( expected - acc() );
tol = EPSILON * abs( expected );

t.strictEqual( delta <= tol, true, 'within tolerance. Expected: '+expected+'. Actual: '+acc()+'. Delta: '+delta+'. Tol: '+tol+'.' );
t.strictEqual( isAlmostSameValue( acc(), expected, 1 ), true, 'returns expected value' );
t.end();
});

Expand All @@ -169,8 +163,6 @@ tape( 'the accumulator function can return a result which underflows', function

tape( 'underflow may be transient', function test( t ) {
var expected;
var delta;
var tol;
var acc;
var x;
var y;
Expand All @@ -191,10 +183,7 @@ tape( 'underflow may be transient', function test( t ) {

acc( z );

delta = abs( acc() - expected );
tol = EPSILON * abs( expected );

t.strictEqual( delta <= tol, true, 'within tolerance. Expected: '+expected+'. Actual: '+acc()+'. Delta: '+delta+'. Tol: '+tol+'.' );
t.strictEqual( isAlmostSameValue( acc(), expected, 1 ), true, 'returns expected value' );
t.end();
});

Expand Down
Loading