Skip to content
Open
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 @@ -150,7 +150,7 @@ tape( 'the created function evaluates the mgf for `x` given large parameter `p`'
t.end();
});

tape( 'the factory function returns NaN when t equals the boundary condition t = -ln(1-p)', function test( t ) {
tape( 'the factory function returns `NaN` when `t` equals the boundary condition `t = -ln(1-p)`', function test( t ) {
var boundary;
var mgf;
var y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tape( 'the function evaluates the MGF for `x` given large parameter `p`', functi
t.end();
});

tape( 'the function returns NaN when t equals the boundary condition t = -ln(1-p)', function test( t ) {
tape( 'the function returns `NaN` when `t` equals the boundary condition `t = -ln(1-p)`', function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -134,7 +134,7 @@ tape( 'the function returns NaN when t equals the boundary condition t = -ln(1-p
t.end();
});

tape( 'the function returns a finite value when t is just below the boundary condition', function test( t ) {
tape( 'the function returns a finite value when `t` is just below the boundary condition', function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -147,7 +147,7 @@ tape( 'the function returns a finite value when t is just below the boundary con
t.end();
});

tape( 'the function returns NaN when t is just above the boundary condition', function test( t ) {
tape( 'the function returns NaN when `t` is just above the boundary condition', function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -159,23 +159,23 @@ tape( 'the function returns NaN when t is just above the boundary condition', fu
t.end();
});

tape( 'the function returns NaN when p equals 0', function test( t ) {
tape( 'the function returns `NaN` when `p` equals `0`', function test( t ) {
var y;

y = mgf( 0.5, 0.0 );
t.strictEqual( isnan( y ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns e^t when p equals 1', function test( t ) {
tape( 'the function returns `e^t` when `p` equals `1`', function test( t ) {
var y;

y = mgf( 0.5, 1.0 );
t.strictEqual( y, exp( 0.5 ), 'returns expected value' );
t.end();
});

tape( 'the function returns NaN for very small p values due to boundary condition', function test( t ) {
tape( 'the function returns `NaN` for very small `p` values due to boundary condition', function test( t ) {
var y;

y = mgf( 0.001, 1e-10 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ tape( 'the function evaluates the MGF for `x` given large parameter `p`', opts,
t.end();
});

tape( 'the function returns NaN when t equals the boundary condition t = -ln(1-p)', opts, function test( t ) {
tape( 'the function returns `NaN` when `t` equals the boundary condition `t = -ln(1-p)`', opts, function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -143,7 +143,7 @@ tape( 'the function returns NaN when t equals the boundary condition t = -ln(1-p
t.end();
});

tape( 'the function returns a finite value when t is just below the boundary condition', opts, function test( t ) {
tape( 'the function returns a finite value when `t` is just below the boundary condition', opts, function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -156,7 +156,7 @@ tape( 'the function returns a finite value when t is just below the boundary con
t.end();
});

tape( 'the function returns NaN when t is just above the boundary condition', opts, function test( t ) {
tape( 'the function returns `NaN` when `t` is just above the boundary condition', opts, function test( t ) {
var boundary;
var p;
var y;
Expand All @@ -168,23 +168,23 @@ tape( 'the function returns NaN when t is just above the boundary condition', op
t.end();
});

tape( 'the function returns NaN when p equals 0', opts, function test( t ) {
tape( 'the function returns `NaN` when `p` equals `0`', opts, function test( t ) {
var y;

y = mgf( 0.5, 0.0 );
t.strictEqual( isnan( y ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns e^t when p equals 1', opts, function test( t ) {
tape( 'the function returns `e^t` when `p` equals `1`', opts, function test( t ) {
var y;

y = mgf( 0.5, 1.0 );
t.strictEqual( y, exp( 0.5 ), 'returns expected value' );
t.end();
});

tape( 'the function returns NaN for very small p values due to boundary condition', opts, function test( t ) {
tape( 'the function returns `NaN` for very small `p` values due to boundary condition', opts, function test( t ) {
var y;

y = mgf( 0.001, 1e-10 );
Expand Down