Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
// MODULES //

var tape = require( 'tape' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var abs = require( '@stdlib/math/base/special/abs' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPS = require( '@stdlib/constants/float64/eps' );
var kurtosis = require( './../lib' );


Expand Down Expand Up @@ -94,11 +93,9 @@
t.end();
});

tape( 'the function returns the excess kurtosis of a Fréchet distribution', function test( t ) {

Check warning on line 96 in lib/node_modules/@stdlib/stats/base/dists/frechet/kurtosis/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "échet"
var expected;
var alpha;
var delta;
var tol;
var s;
var y;
var i;
Expand All @@ -109,13 +106,7 @@
for ( i = 0; i < alpha.length; i++ ) {
y = kurtosis( alpha[i], s[i], 0.0 );
if ( expected[i] !== null ) {
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'alpha:'+alpha[i]+', s: '+s[i]+', m: 0, y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[ i ] );
tol = 1350.0 * EPS * abs( expected[ i ] );
t.ok( delta <= tol, 'within tolerance. alpha: '+alpha[i]+'. s: '+s[i]+'. m: 0. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
}
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1782 ), true, 'returns expected value' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@

var resolve = require( 'path' ).resolve;
var tape = require( 'tape' );
var abs = require( '@stdlib/math/base/special/abs' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var tryRequire = require( '@stdlib/utils/try-require' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPS = require( '@stdlib/constants/float64/eps' );


// FIXTURES //
Expand Down Expand Up @@ -109,11 +108,9 @@
t.end();
});

tape( 'the function returns the excess kurtosis of a Fréchet distribution', opts, function test( t ) {

Check warning on line 111 in lib/node_modules/@stdlib/stats/base/dists/frechet/kurtosis/test/test.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "échet"
var expected;
var alpha;
var delta;
var tol;
var s;
var y;
var i;
Expand All @@ -124,13 +121,7 @@
for ( i = 0; i < alpha.length; i++ ) {
y = kurtosis( alpha[i], s[i], 0.0 );
if ( expected[i] !== null ) {
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'alpha:'+alpha[i]+', s: '+s[i]+', m: 0, y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[ i ] );
tol = 1500.0 * EPS * abs( expected[ i ] );
t.ok( delta <= tol, 'within tolerance. alpha: '+alpha[i]+'. s: '+s[i]+'. m: 0. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
}
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1782 ), true, 'returns expected value' );
}
}
t.end();
Expand Down