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
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/gscal/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var ndarray = require( './ndarray.js' );
* @param {PositiveInteger} N - number of indexed elements
* @param {number} alpha - scalar constant
* @param {NumericArray} x - input array
* @param {PositiveInteger} stride - stride length
* @param {PositiveInteger} stride - stride length
* @returns {NumericArray} input array
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ tape( 'the function evaluates the cdf for `x` given `mu` and `sigma`', function
sigma = data.sigma;

for ( i = 0; i < x.length; i++ ) {
y = cdf( x[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'x: '+x[i]+', mu: '+mu[i]+', σ: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = cdf( x[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', mu: '+mu[ i ]+', σ: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 3 ), 'within tolerance. x: '+x[i]+'. mu: '+mu[i]+'. σ: '+sigma[i]+'. y: '+y+'. E: '+expected[i]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 3 ), 'within tolerance. x: '+x[ i ]+'. mu: '+mu[ i ]+'. σ: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ tape( 'the created function evaluates the cdf for `x` given `mu` and `sigma`', f
sigma = data.sigma;

for ( i = 0; i < x.length; i++ ) {
cdf = factory( mu[i], sigma[i] );
y = cdf( x[i] );
if ( y === expected[i] ) {
t.strictEqual(y, expected[i], 'x: '+x[i]+', mu: '+mu[i]+', σ: '+sigma[i]+', y: '+y+', expected: '+expected[i]);
cdf = factory( mu[ i ], sigma[ i ] );
y = cdf( x[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', mu: '+mu[ i ]+', σ: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 3 ), 'within tolerance. x: '+x[i]+'. mu: '+mu[i]+'. σ: '+sigma[i]+'. y: '+y+'. E: '+expected[i]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 3 ), 'within tolerance. x: '+x[ i ]+'. mu: '+mu[ i ]+'. σ: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ tape( 'the function evaluates the cdf for `x` given `mu` and `sigma`', opts, fun
sigma = data.sigma;

for ( i = 0; i < x.length; i++ ) {
y = cdf( x[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'x: '+x[i]+', mu: '+mu[i]+', σ: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = cdf( x[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', mu: '+mu[ i ]+', σ: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 3 ), 'within tolerance. x: '+x[i]+'. mu: '+mu[i]+'. σ: '+sigma[i]+'. y: '+y+'. E: '+expected[i]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 3 ), 'within tolerance. x: '+x[ i ]+'. mu: '+mu[ i ]+'. σ: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
t.end();
});

tape( 'the function returns the differential entropy of an anglit distribution', function test( t ) {

Check warning on line 64 in lib/node_modules/@stdlib/stats/base/dists/anglit/entropy/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -72,11 +72,11 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < expected.length; i++ ) {
y = entropy( mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = entropy( mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 5 ), 'within tolerance. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[i]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 5 ), 'within tolerance. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
t.end();
});

tape( 'the function returns the differential entropy of an anglit distribution', opts, function test( t ) {

Check warning on line 73 in lib/node_modules/@stdlib/stats/base/dists/anglit/entropy/test/test.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -81,11 +81,11 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < expected.length; i++ ) {
y = entropy( mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = entropy( mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 5 ), 'within tolerance. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[i]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 5 ), 'within tolerance. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
20 changes: 10 additions & 10 deletions lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
t.end();
});

tape( 'the function returns the expected value of an anglit distribution', function test( t ) {

Check warning on line 79 in lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -87,8 +87,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -104,8 +104,8 @@
mu = smallMu.mu;
sigma = smallMu.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -121,8 +121,8 @@
mu = largeMu.mu;
sigma = largeMu.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -138,8 +138,8 @@
mu = smallSigma.mu;
sigma = smallSigma.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -155,8 +155,8 @@
mu = largeSigma.mu;
sigma = largeSigma.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
t.end();
});

tape( 'the function returns the expected value of an anglit distribution', opts, function test( t ) {

Check warning on line 87 in lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -95,8 +95,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -112,8 +112,8 @@
mu = smallMu.mu;
sigma = smallMu.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -129,8 +129,8 @@
mu = largeMu.mu;
sigma = largeMu.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -146,8 +146,8 @@
mu = smallSigma.mu;
sigma = smallSigma.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Expand All @@ -163,8 +163,8 @@
mu = largeSigma.mu;
sigma = largeSigma.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mean( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mean( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
t.end();
});

tape( 'the function returns the median of an anglit distribution', function test( t ) {

Check warning on line 75 in lib/node_modules/@stdlib/stats/base/dists/anglit/median/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -83,8 +83,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = median( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = median( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
t.end();
});

tape( 'the function returns the median of an anglit distribution', opts, function test( t ) {

Check warning on line 84 in lib/node_modules/@stdlib/stats/base/dists/anglit/median/test/test.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -92,8 +92,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = median( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = median( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
t.end();
});

tape( 'the function returns the mode of an anglit distribution', function test( t ) {

Check warning on line 75 in lib/node_modules/@stdlib/stats/base/dists/anglit/mode/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -83,8 +83,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mode( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mode( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
t.end();
});

tape( 'the function returns the mode of an anglit distribution', opts, function test( t ) {

Check warning on line 87 in lib/node_modules/@stdlib/stats/base/dists/anglit/mode/test/test.native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
var expected;
var sigma;
var mu;
Expand All @@ -95,8 +95,8 @@
mu = data.mu;
sigma = data.sigma;
for ( i = 0; i < mu.length; i++ ) {
y = mode( mu[i], sigma[i] );
t.strictEqual( y, expected[i], 'returns expected value' );
y = mode( mu[ i ], sigma[ i ] );
t.strictEqual( y, expected[ i ], 'returns expected value' );
}
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ tape( 'the created function evaluates the quantile function at `p` given positiv
mu = positiveMu.mu;
sigma = positiveMu.sigma;
for ( i = 0; i < p.length; i++ ) {
quantile = factory( mu[i], sigma[i] );
y = quantile( p[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
quantile = factory( mu[ i ], sigma[ i ] );
y = quantile( p[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -165,12 +165,12 @@ tape( 'the created function evaluates the quantile function at `p` given negativ
mu = negativeMu.mu;
sigma = negativeMu.sigma;
for ( i = 0; i < p.length; i++ ) {
quantile = factory( mu[i], sigma[i] );
y = quantile( p[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
quantile = factory( mu[ i ], sigma[ i ] );
y = quantile( p[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -190,12 +190,12 @@ tape( 'the created function evaluates the quantile function at `p` given large `
mu = largeSigma.mu;
sigma = largeSigma.sigma;
for ( i = 0; i < p.length; i++ ) {
quantile = factory( mu[i], sigma[i] );
y = quantile( p[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
quantile = factory( mu[ i ], sigma[ i ] );
y = quantile( p[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ tape( 'the function evaluates the quantile function at `p` given positive `mu`',
mu = positiveMu.mu;
sigma = positiveMu.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -148,11 +148,11 @@ tape( 'the function evaluates the quantile function at `p` given negative `mu`',
mu = negativeMu.mu;
sigma = negativeMu.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -171,11 +171,11 @@ tape( 'the function evaluates the quantile function at `p` given large `sigma`',
mu = largeSigma.mu;
sigma = largeSigma.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ tape( 'the function evaluates the quantile function at `p` given positive `mu`',
mu = positiveMu.mu;
sigma = positiveMu.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 5 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -139,11 +139,11 @@ tape( 'the function evaluates the quantile function at `p` given negative `mu`',
mu = negativeMu.mu;
sigma = negativeMu.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 80 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand All @@ -162,11 +162,11 @@ tape( 'the function evaluates the quantile function at `p` given large `sigma`',
mu = largeSigma.mu;
sigma = largeSigma.sigma;
for ( i = 0; i < p.length; i++ ) {
y = quantile( p[i], mu[i], sigma[i] );
if ( y === expected[i] ) {
t.strictEqual( y, expected[i], 'p: '+p[i]+', mu: '+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
y = quantile( p[ i ], mu[ i ], sigma[ i ] );
if ( y === expected[ i ] ) {
t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', sigma: '+sigma[ i ]+', y: '+y+', expected: '+expected[ i ] );
} else {
t.ok( isAlmostSameValue( y, expected[i], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'.' );
t.ok( isAlmostSameValue( y, expected[ i ], 500 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[ i ]+'. sigma: '+sigma[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' );
}
}
t.end();
Expand Down
Loading