diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/factory.js index 4f20fbe9991c..62690fbb9625 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/factory.js @@ -24,6 +24,7 @@ var constantFunction = require( '@stdlib/utils/constant-function' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var ln = require( '@stdlib/math/base/special/ln' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); @@ -73,9 +74,28 @@ function factory( a, b ) { if ( isnan( x ) ) { return NaN; } - if ( x <= 0.0 || x >= 1.0 ) { + if ( x < 0.0 || x > 1.0 ) { return NINF; } + // At the boundaries of the support, the density is infinite, finite, or zero depending on whether the corresponding shape parameter is less than, equal to, or greater than one: + if ( x === 0.0 ) { + if ( a < 1.0 ) { + return PINF; + } + if ( a > 1.0 ) { + return NINF; + } + return ln( b ); + } + if ( x === 1.0 ) { + if ( b < 1.0 ) { + return PINF; + } + if ( b > 1.0 ) { + return NINF; + } + return ln( a ); + } out = ln( a*b ); out += ( a - 1.0 ) * ln( x ); out += ( b - 1.0 ) * ln( 1.0 - pow( x, a ) ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/main.js index 39d74739b744..89732266c2f1 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/lib/main.js @@ -23,6 +23,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); var ln = require( '@stdlib/math/base/special/ln' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); @@ -92,9 +93,28 @@ function logpdf( x, a, b ) { ) { return NaN; } - if ( x <= 0.0 || x >= 1.0 ) { + if ( x < 0.0 || x > 1.0 ) { return NINF; } + // At the boundaries of the support, the density is infinite, finite, or zero depending on whether the corresponding shape parameter is less than, equal to, or greater than one: + if ( x === 0.0 ) { + if ( a < 1.0 ) { + return PINF; + } + if ( a > 1.0 ) { + return NINF; + } + return ln( b ); + } + if ( x === 1.0 ) { + if ( b < 1.0 ) { + return PINF; + } + if ( b > 1.0 ) { + return NINF; + } + return ln( a ); + } out = ln( a*b ); out += ( a - 1.0 ) * ln( x ); out += ( b - 1.0 ) * ln( 1.0 - pow( x, a ) ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/manifest.json index b302141e0a29..a867fb290bb2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/manifest.json +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/manifest.json @@ -42,6 +42,7 @@ "@stdlib/math/base/assert/is-nan", "@stdlib/math/base/special/pow", "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/pinf", "@stdlib/constants/float64/ninf" ] }, @@ -60,6 +61,7 @@ "@stdlib/math/base/assert/is-nan", "@stdlib/math/base/special/pow", "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/pinf", "@stdlib/constants/float64/ninf" ] }, @@ -78,6 +80,7 @@ "@stdlib/math/base/assert/is-nan", "@stdlib/math/base/special/pow", "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/pinf", "@stdlib/constants/float64/ninf" ] } diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/src/main.c index c3bdaef89a33..8b1e7f39b491 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/src/main.c @@ -20,6 +20,7 @@ #include "stdlib/math/base/assert/is_nan.h" #include "stdlib/math/base/special/pow.h" #include "stdlib/math/base/special/ln.h" +#include "stdlib/constants/float64/pinf.h" #include "stdlib/constants/float64/ninf.h" /** @@ -45,12 +46,28 @@ double stdlib_base_dists_kumaraswamy_logpdf( const double x, const double a, con ) { return 0.0/0.0; // NaN } - if ( - x <= 0.0 || - x >= 1.0 - ) { + if ( x < 0.0 || x > 1.0 ) { return STDLIB_CONSTANT_FLOAT64_NINF; } + // At the boundaries of the support, the density is infinite, finite, or zero depending on whether the corresponding shape parameter is less than, equal to, or greater than one: + if ( x == 0.0 ) { + if ( a < 1.0 ) { + return STDLIB_CONSTANT_FLOAT64_PINF; + } + if ( a > 1.0 ) { + return STDLIB_CONSTANT_FLOAT64_NINF; + } + return stdlib_base_ln( b ); + } + if ( x == 1.0 ) { + if ( b < 1.0 ) { + return STDLIB_CONSTANT_FLOAT64_PINF; + } + if ( b > 1.0 ) { + return STDLIB_CONSTANT_FLOAT64_NINF; + } + return stdlib_base_ln( a ); + } out = stdlib_base_ln( a*b ); out += ( a - 1.0 ) * stdlib_base_ln( x ); out += ( b - 1.0 ) * stdlib_base_ln( 1.0 - stdlib_base_pow( x, a ) ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.factory.js index 4c027819d472..47926ce3a2bd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.factory.js @@ -73,7 +73,7 @@ tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', t.end(); }); -tape( 'if provided a finite `a` and `b`, the function returns a function which returns `-infinity` when provided a number greater than or equal to one for `x`', function test( t ) { +tape( 'if provided a finite `a` and `b`, the function returns a function which returns `-infinity` when provided a number greater than one for `x`', function test( t ) { var logpdf; var y; @@ -87,13 +87,10 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r y = logpdf( 10.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 1.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); - t.end(); }); -tape( 'if provided a finite `a` and `b`, the function returns a function which returns `-infinity` when provided a number smaller than or equal to zero for `x`', function test( t ) { +tape( 'if provided a finite `a` and `b`, the function returns a function which returns `-infinity` when provided a number smaller than zero for `x`', function test( t ) { var logpdf; var y; @@ -110,8 +107,35 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r y = logpdf( -1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 0.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the created function returns `+infinity`, `ln(b)`, or `-infinity` at `x = 0` when `a` is less than, equal to, or greater than one', function test( t ) { + var logpdf; + + logpdf = factory( 0.5, 2.0 ); + t.strictEqual( logpdf( 0.0 ), PINF, 'returns expected value' ); + + logpdf = factory( 1.0, 2.0 ); + t.strictEqual( logpdf( 0.0 ), ln( 2.0 ), 'returns expected value' ); + + logpdf = factory( 3.0, 2.0 ); + t.strictEqual( logpdf( 0.0 ), NINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function returns `+infinity`, `ln(a)`, or `-infinity` at `x = 1` when `b` is less than, equal to, or greater than one', function test( t ) { + var logpdf; + + logpdf = factory( 3.0, 0.5 ); + t.strictEqual( logpdf( 1.0 ), PINF, 'returns expected value' ); + + logpdf = factory( 3.0, 1.0 ); + t.strictEqual( logpdf( 1.0 ), ln( 3.0 ), 'returns expected value' ); + + logpdf = factory( 3.0, 2.0 ); + t.strictEqual( logpdf( 1.0 ), NINF, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.logpdf.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.logpdf.js index 492bd05600d8..406740850bca 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.logpdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.logpdf.js @@ -50,7 +50,7 @@ tape( 'if provided `NaN` for any parameter, the function returns `NaN`', functio t.end(); }); -tape( 'if provided a number greater than or equal to one for `x` and a finite `a` and `b`, the function returns `-infinity`', function test( t ) { +tape( 'if provided a number greater than one for `x` and a finite `a` and `b`, the function returns `-infinity`', function test( t ) { var y = logpdf( PINF, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); @@ -60,13 +60,10 @@ tape( 'if provided a number greater than or equal to one for `x` and a finite `a y = logpdf( 10.0, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 1.0, 0.5, 1.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); - t.end(); }); -tape( 'if provided a number less than or equal to zero for `x` and a finite `a` and `b`, the function returns `-infinity`', function test( t ) { +tape( 'if provided a number less than zero for `x` and a finite `a` and `b`, the function returns `-infinity`', function test( t ) { var y = logpdf( NINF, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); @@ -76,9 +73,20 @@ tape( 'if provided a number less than or equal to zero for `x` and a finite `a` y = logpdf( -1.0, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 0.0, 0.5, 1.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+infinity`, `ln(b)`, or `-infinity` at `x = 0` when `a` is less than, equal to, or greater than one', function test( t ) { + t.strictEqual( logpdf( 0.0, 0.5, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( logpdf( 0.0, 1.0, 2.0 ), ln( 2.0 ), 'returns expected value' ); + t.strictEqual( logpdf( 0.0, 3.0, 2.0 ), NINF, 'returns expected value' ); + t.end(); +}); +tape( 'the function returns `+infinity`, `ln(a)`, or `-infinity` at `x = 1` when `b` is less than, equal to, or greater than one', function test( t ) { + t.strictEqual( logpdf( 1.0, 3.0, 0.5 ), PINF, 'returns expected value' ); + t.strictEqual( logpdf( 1.0, 3.0, 1.0 ), ln( 3.0 ), 'returns expected value' ); + t.strictEqual( logpdf( 1.0, 3.0, 2.0 ), NINF, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.native.js index 08ecf088a168..9afe2b8ce8f1 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/test/test.native.js @@ -59,7 +59,7 @@ tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, f t.end(); }); -tape( 'if provided a number greater than or equal to one for `x` and a finite `a` and `b`, the function returns `-infinity`', opts, function test( t ) { +tape( 'if provided a number greater than one for `x` and a finite `a` and `b`, the function returns `-infinity`', opts, function test( t ) { var y = logpdf( PINF, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); @@ -69,13 +69,10 @@ tape( 'if provided a number greater than or equal to one for `x` and a finite `a y = logpdf( 10.0, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 1.0, 0.5, 1.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); - t.end(); }); -tape( 'if provided a number less than or equal to zero for `x` and a finite `a` and `b`, the function returns `-infinity`', opts, function test( t ) { +tape( 'if provided a number less than zero for `x` and a finite `a` and `b`, the function returns `-infinity`', opts, function test( t ) { var y = logpdf( NINF, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); @@ -85,9 +82,20 @@ tape( 'if provided a number less than or equal to zero for `x` and a finite `a` y = logpdf( -1.0, 0.5, 1.0 ); t.strictEqual( y, NINF, 'returns expected value' ); - y = logpdf( 0.0, 0.5, 1.0 ); - t.strictEqual( y, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+infinity`, `ln(b)`, or `-infinity` at `x = 0` when `a` is less than, equal to, or greater than one', opts, function test( t ) { + t.strictEqual( logpdf( 0.0, 0.5, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( logpdf( 0.0, 1.0, 2.0 ), ln( 2.0 ), 'returns expected value' ); + t.strictEqual( logpdf( 0.0, 3.0, 2.0 ), NINF, 'returns expected value' ); + t.end(); +}); +tape( 'the function returns `+infinity`, `ln(a)`, or `-infinity` at `x = 1` when `b` is less than, equal to, or greater than one', opts, function test( t ) { + t.strictEqual( logpdf( 1.0, 3.0, 0.5 ), PINF, 'returns expected value' ); + t.strictEqual( logpdf( 1.0, 3.0, 1.0 ), ln( 3.0 ), 'returns expected value' ); + t.strictEqual( logpdf( 1.0, 3.0, 2.0 ), NINF, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/factory.js index e448b6a588a2..91cc2b85611a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/factory.js @@ -23,6 +23,7 @@ var constantFunction = require( '@stdlib/utils/constant-function' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); // MAIN // @@ -69,9 +70,28 @@ function factory( a, b ) { if ( isnan( x ) ) { return NaN; } - if ( x <= 0.0 || x >= 1.0 ) { + if ( x < 0.0 || x > 1.0 ) { return 0.0; } + // At the boundaries of the support, the density is infinite, finite, or zero depending on whether the corresponding shape parameter is less than, equal to, or greater than one: + if ( x === 0.0 ) { + if ( a < 1.0 ) { + return PINF; + } + if ( a > 1.0 ) { + return 0.0; + } + return b; + } + if ( x === 1.0 ) { + if ( b < 1.0 ) { + return PINF; + } + if ( b > 1.0 ) { + return 0.0; + } + return a; + } return ( a*b ) * pow( x, a - 1.0 ) * pow( 1.0 - pow( x, a ), b - 1.0 ); } } diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/main.js index 8369f76878a3..13281ddf1879 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/lib/main.js @@ -22,6 +22,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pow = require( '@stdlib/math/base/special/pow' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); // MAIN // @@ -88,9 +89,28 @@ function pdf( x, a, b ) { ) { return NaN; } - if ( x <= 0.0 || x >= 1.0 ) { + if ( x < 0.0 || x > 1.0 ) { return 0.0; } + // At the boundaries of the support, the density is infinite, finite, or zero depending on whether the corresponding shape parameter is less than, equal to, or greater than one: + if ( x === 0.0 ) { + if ( a < 1.0 ) { + return PINF; + } + if ( a > 1.0 ) { + return 0.0; + } + return b; + } + if ( x === 1.0 ) { + if ( b < 1.0 ) { + return PINF; + } + if ( b > 1.0 ) { + return 0.0; + } + return a; + } return ( a*b ) * pow( x, a - 1.0 ) * pow( 1.0 - pow( x, a ), b - 1.0 ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.factory.js index 3b8fc6934211..d9f94e41acd9 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.factory.js @@ -71,7 +71,7 @@ tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', t.end(); }); -tape( 'if provided a finite `a` and `b`, the function returns a function which returns `0` when provided a number greater than or equal to one for `x`', function test( t ) { +tape( 'if provided a finite `a` and `b`, the function returns a function which returns `0` when provided a number greater than one for `x`', function test( t ) { var pdf; var y; @@ -85,13 +85,10 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r y = pdf( 10.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); - y = pdf( 1.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); - t.end(); }); -tape( 'if provided a finite `a` and `b`, the function returns a function which returns `0` when provided a number smaller than or equal to zero for `x`', function test( t ) { +tape( 'if provided a finite `a` and `b`, the function returns a function which returns `0` when provided a number smaller than zero for `x`', function test( t ) { var pdf; var y; @@ -108,8 +105,35 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r y = pdf( -1.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); - y = pdf( 0.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'the created function returns `+infinity`, `b`, or `0` at `x = 0` when `a` is less than, equal to, or greater than one', function test( t ) { + var pdf; + + pdf = factory( 0.5, 2.0 ); + t.strictEqual( pdf( 0.0 ), PINF, 'returns expected value' ); + + pdf = factory( 1.0, 2.0 ); + t.strictEqual( pdf( 0.0 ), 2.0, 'returns expected value' ); + + pdf = factory( 3.0, 2.0 ); + t.strictEqual( pdf( 0.0 ), 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function returns `+infinity`, `a`, or `0` at `x = 1` when `b` is less than, equal to, or greater than one', function test( t ) { + var pdf; + + pdf = factory( 3.0, 0.5 ); + t.strictEqual( pdf( 1.0 ), PINF, 'returns expected value' ); + + pdf = factory( 3.0, 1.0 ); + t.strictEqual( pdf( 1.0 ), 3.0, 'returns expected value' ); + + pdf = factory( 3.0, 2.0 ); + t.strictEqual( pdf( 1.0 ), 0.0, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.pdf.js index 2cf92a51c70c..486d0b552d78 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.pdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/test/test.pdf.js @@ -48,7 +48,7 @@ tape( 'if provided `NaN` for any parameter, the function returns `NaN`', functio t.end(); }); -tape( 'if provided a number greater than or equal to one for `x` and a finite `a` and `b`, the function returns `0`', function test( t ) { +tape( 'if provided a number greater than one for `x` and a finite `a` and `b`, the function returns `0`', function test( t ) { var y = pdf( PINF, 0.5, 1.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); @@ -58,13 +58,10 @@ tape( 'if provided a number greater than or equal to one for `x` and a finite `a y = pdf( 10.0, 0.5, 1.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); - y = pdf( 1.0, 0.5, 1.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); - t.end(); }); -tape( 'if provided a number less than or equal to zero for `x` and a finite `a` and `b`, the function returns `0`', function test( t ) { +tape( 'if provided a number less than zero for `x` and a finite `a` and `b`, the function returns `0`', function test( t ) { var y = pdf( NINF, 0.5, 1.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); @@ -74,9 +71,20 @@ tape( 'if provided a number less than or equal to zero for `x` and a finite `a` y = pdf( -1.0, 0.5, 1.0 ); t.strictEqual( y, 0.0, 'returns expected value' ); - y = pdf( 0.0, 0.5, 1.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+infinity`, `b`, or `0` at `x = 0` when `a` is less than, equal to, or greater than one', function test( t ) { + t.strictEqual( pdf( 0.0, 0.5, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( pdf( 0.0, 1.0, 2.0 ), 2.0, 'returns expected value' ); + t.strictEqual( pdf( 0.0, 3.0, 2.0 ), 0.0, 'returns expected value' ); + t.end(); +}); +tape( 'the function returns `+infinity`, `a`, or `0` at `x = 1` when `b` is less than, equal to, or greater than one', function test( t ) { + t.strictEqual( pdf( 1.0, 3.0, 0.5 ), PINF, 'returns expected value' ); + t.strictEqual( pdf( 1.0, 3.0, 1.0 ), 3.0, 'returns expected value' ); + t.strictEqual( pdf( 1.0, 3.0, 2.0 ), 0.0, 'returns expected value' ); t.end(); });