diff --git a/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/addon.c index 14a57757c935..bfe0ce220498 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/addon.c +++ b/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/addon.c @@ -19,4 +19,4 @@ #include "stdlib/stats/base/dists/binomial/logpmf.h" #include "stdlib/math/base/napi/ternary.h" -STDLIB_MATH_BASE_NAPI_MODULE_DID_D( stdlib_base_dists_binomial_logpmf ); +STDLIB_MATH_BASE_NAPI_MODULE_DID_D( stdlib_base_dists_binomial_logpmf ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/test/test.native.js index 0b1f80b6bae8..28703e83f7ff 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/test/test.native.js @@ -155,13 +155,13 @@ tape( 'the function evaluates the logpmf for `x` given large `n` and `p`', opts, n = highHigh.n; p = highHigh.p; for ( i = 0; i < x.length; i++ ) { - y = logpmf( x[i], n[i], p[i] ); - if ( y === expected[i] ) { - t.strictEqual( y, expected[i], 'x: '+x[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = logpmf( x[ i ], n[ i ], p[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } else { - delta = abs( y - expected[i] ); - tol = 30.0 * EPS * abs( expected[i] ); - t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[i]+'. n: '+n[i]+'. p: '+p[i]+'. y: '+y+'. Expected: '+expected[i]+'. tol: '+tol+'. delta: '+delta+'.' ); + delta = abs( y - expected[ i ] ); + tol = 30.0 * EPS * abs( expected[ i ] ); + t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[ i ]+'. n: '+n[ i ]+'. p: '+p[ i ]+'. y: '+y+'. Expected: '+expected[ i ]+'. tol: '+tol+'. delta: '+delta+'.' ); } } t.end(); @@ -182,13 +182,13 @@ tape( 'the function evaluates the logpmf for `x` given large `n` and small `p`', n = highSmall.n; p = highSmall.p; for ( i = 0; i < x.length; i++ ) { - y = logpmf( x[i], n[i], p[i] ); - if ( y === expected[i] ) { - t.strictEqual( y, expected[i], 'x: '+x[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = logpmf( x[ i ], n[ i ], p[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } else { - delta = abs( y - expected[i] ); - tol = 20.0 * EPS * abs( expected[i] ); - t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[i]+'. n: '+n[i]+'. p: '+p[i]+'. y: '+y+'. Expected: '+expected[i]+'. tol: '+tol+'. delta: '+delta+'.' ); + delta = abs( y - expected[ i ] ); + tol = 20.0 * EPS * abs( expected[ i ] ); + t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[ i ]+'. n: '+n[ i ]+'. p: '+p[ i ]+'. y: '+y+'. Expected: '+expected[ i ]+'. tol: '+tol+'. delta: '+delta+'.' ); } } t.end(); @@ -209,13 +209,13 @@ tape( 'the function evaluates the logpmf for `x` given small `n` and large `p`', n = smallHigh.n; p = smallHigh.p; for ( i = 0; i < x.length; i++ ) { - y = logpmf( x[i], n[i], p[i] ); - if ( y === expected[i] ) { - t.strictEqual( y, expected[i], 'x: '+x[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = logpmf( x[ i ], n[ i ], p[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } else { - delta = abs( y - expected[i] ); - tol = 20.0 * EPS * abs( expected[i] ); - t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[i]+'. n: '+n[i]+'. p: '+p[i]+'. y: '+y+'. Expected: '+expected[i]+'. tol: '+tol+'. delta: '+delta+'.' ); + delta = abs( y - expected[ i ] ); + tol = 20.0 * EPS * abs( expected[ i ] ); + t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[ i ]+'. n: '+n[ i ]+'. p: '+p[ i ]+'. y: '+y+'. Expected: '+expected[ i ]+'. tol: '+tol+'. delta: '+delta+'.' ); } } t.end(); @@ -236,13 +236,13 @@ tape( 'the function evaluates the logpmf for `x` given small `n` and `p`', opts, n = smallSmall.n; p = smallSmall.p; for ( i = 0; i < x.length; i++ ) { - y = logpmf( x[i], n[i], p[i] ); - if ( y === expected[i] ) { - t.strictEqual( y, expected[i], 'x: '+x[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = logpmf( x[ i ], n[ i ], p[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } else { - delta = abs( y - expected[i] ); - tol = 10.0 * EPS * abs( expected[i] ); - t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[i]+'. n: '+n[i]+'. p: '+p[i]+'. y: '+y+'. Expected: '+expected[i]+'. tol: '+tol+'. delta: '+delta+'.' ); + delta = abs( y - expected[ i ] ); + tol = 10.0 * EPS * abs( expected[ i ] ); + t.strictEqual( delta <= tol, true, 'within tolerance. x: '+x[ i ]+'. n: '+n[ i ]+'. p: '+p[ i ]+'. y: '+y+'. Expected: '+expected[ i ]+'. tol: '+tol+'. delta: '+delta+'.' ); } } t.end(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/lib/native.js index 042ae7c64b0f..513bf23df38e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/lib/native.js @@ -31,7 +31,7 @@ var addon = require( './../src/addon.node' ); * @private * @param {Probability} r - input value * @param {NonNegativeInteger} n - number of trials -* @param {Probability} p - success probability +* @param {Probability} p - success probability * @returns {NonNegativeInteger} evaluated quantile function * * @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/test.native.js index c707a8db3268..ac96cefdaeb4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/test.native.js @@ -185,8 +185,8 @@ tape( 'the function evaluates the quantile for `r` given large `n` and `p`', opt n = highHigh.n; p = highHigh.p; for ( i = 0; i < r.length; i++ ) { - y = quantile( r[i], n[i], p[i] ); - t.strictEqual( y, expected[i], 'r: '+r[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = quantile( r[ i ], n[ i ], p[ i ] ); + t.strictEqual( y, expected[ i ], 'r: '+r[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } t.end(); }); @@ -204,8 +204,8 @@ tape( 'the function evaluates the quantile for `r` given large `n` and small `p` n = highSmall.n; p = highSmall.p; for ( i = 0; i < r.length; i++ ) { - y = quantile( r[i], n[i], p[i] ); - t.strictEqual( y, expected[i], 'r: '+r[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = quantile( r[ i ], n[ i ], p[ i ] ); + t.strictEqual( y, expected[ i ], 'r: '+r[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } t.end(); }); @@ -223,8 +223,8 @@ tape( 'the function evaluates the quantile for `r` given small `n` and large `p` n = smallHigh.n; p = smallHigh.p; for ( i = 0; i < r.length; i++ ) { - y = quantile( r[i], n[i], p[i] ); - t.strictEqual( y, expected[i], 'r: '+r[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = quantile( r[ i ], n[ i ], p[ i ] ); + t.strictEqual( y, expected[ i ], 'r: '+r[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } t.end(); }); @@ -242,8 +242,8 @@ tape( 'the function evaluates the quantile for `r` given small `n` and `p`', opt n = smallSmall.n; p = smallSmall.p; for ( i = 0; i < r.length; i++ ) { - y = quantile( r[i], n[i], p[i] ); - t.strictEqual( y, expected[i], 'r: '+r[i]+', n: '+n[i]+', p: '+p[i]+', y: '+y+', expected: '+expected[i] ); + y = quantile( r[ i ], n[ i ], p[ i ] ); + t.strictEqual( y, expected[ i ], 'r: '+r[ i ]+', n: '+n[ i ]+', p: '+p[ i ]+', y: '+y+', expected: '+expected[ i ] ); } t.end(); });