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
9 changes: 2 additions & 7 deletions lib/node_modules/@stdlib/stats/incr/mmeanstdev/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@

var tape = require( 'tape' );
var randu = require( '@stdlib/random/base/randu' );
var abs = require( '@stdlib/math/base/special/abs' );
var sqrt = require( '@stdlib/math/base/special/sqrt' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var EPS = require( '@stdlib/constants/float64/eps' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var incrmmeanstdev = require( './../lib' );


Expand Down Expand Up @@ -229,9 +228,7 @@ tape( 'the accumulator function computes a moving arithmetic mean and corrected
tape( 'if not provided an input value, the accumulator function returns the current arithmetic mean and corrected sample standard deviation', function test( t ) {
var expected;
var actual;
var delta;
var data;
var tol;
var acc;
var i;

Expand All @@ -249,9 +246,7 @@ tape( 'if not provided an input value, the accumulator function returns the curr

t.strictEqual( actual[ 0 ], expected[ 0 ], 'returns expected value' );

delta = abs( actual[ 1 ] - expected[ 1 ] );
tol = EPS * expected[ 1 ];
t.strictEqual( delta < tol, true, 'expected: '+expected[ 1 ]+'. actual: '+actual+'. tol: '+tol+'. delta: '+delta+'.' );
t.strictEqual( isAlmostSameValue( actual[ 1 ], expected[ 1 ], 1 ), true, 'returns expected value' );

t.end();
});
Expand Down
Loading