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 @@ -22,7 +22,7 @@

var tape = require( 'tape' );
var pow = require( '@stdlib/math/base/special/pow' );
var FLOAT64_SMALLEST_SUBNORMAL = require( './../lib' );

Check warning on line 25 in lib/node_modules/@stdlib/constants/float64/smallest-subnormal/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Identifier name 'FLOAT64_SMALLEST_SUBNORMAL' is too long (> 25)


// TESTS //
Expand All @@ -34,6 +34,6 @@
});

tape( 'the exported value equals the smallest double-precision floating-point denormalized value', function test( t ) {
t.equal( FLOAT64_SMALLEST_SUBNORMAL, pow(2, -1022)*pow(2, -52), 'equals 2**-1022 * 2**-52' );
t.equal( FLOAT64_SMALLEST_SUBNORMAL, pow(2, -1022)*pow(2, -52), 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ tape( 'main export is a number', function test( t ) {

tape( 'the exported value equals the square root of the difference between one and the smallest value greater than one which is representable as a double (2**-52)', function test( t ) {
var expected = sqrt( pow( 2, -52 ) );
t.equal( FLOAT64_SQRT_EPSILON, expected, 'equals sqrt(2**-52)' );
t.equal( FLOAT64_SQRT_EPSILON, expected, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ tape( 'main export is a number', function test( t ) {
});

tape( 'export is a double-precision floating-point number equal to `1.2533141373155003`', function test( t ) {
t.equal( SQRT_HALF_PI, 1.2533141373155003, 'equals 1.2533141373155003' );
t.equal( SQRT_HALF_PI, 1.2533141373155003, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ tape( 'main export is a number', function test( t ) {

tape( 'the exported value is a double-precision floating-point number which equals the square root of 1/2', function test( t ) {
var expected = sqrt( 1/2 );
t.equal( SQRT_HALF, expected, 'equals sqrt(1/2)' );
t.equal( SQRT_HALF, expected, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ tape( 'main export is a number', function test( t ) {
});

tape( 'export is a double-precision floating-point number equal to 1.272019649514069', function test( t ) {
t.equal( SQRT_PHI, 1.272019649514069, 'equals 1.272019649514069' );
t.equal( SQRT_PHI, 1.272019649514069, 'returns expected value' );
t.end();
});

tape( 'the exported value equals sqrt(φ)', function test( t ) {
t.equal( SQRT_PHI, sqrt(PHI), 'equals sqrt(φ)' );
t.equal( SQRT_PHI, sqrt(PHI), 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ tape( 'main export is a number', function test( t ) {
});

tape( 'export is a double-precision floating-point number equal to `1.7724538509055160`', function test( t ) {
t.equal( SQRT_PI, 1.7724538509055160, 'equals 1.7724538509055160' );
t.equal( SQRT_PI, 1.7724538509055160, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ tape( 'main export is a number', function test( t ) {

tape( 'the exported value is a double-precision floating-point number equal to the square root of 3', function test( t ) {
var expected = sqrt( 3 );
t.equal( SQRT3, expected, 'equals sqrt(3)' );
t.equal( SQRT3, expected, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ tape( 'main export is a number', function test( t ) {
});

tape( 'export is a double-precision floating-point number equal to `2.5066282746310007`', function test( t ) {
t.equal( SQRT_TWO_PI, 2.5066282746310007, 'equals 2.5066282746310007' );
t.equal( SQRT_TWO_PI, 2.5066282746310007, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ tape( 'main export is a number', function test( t ) {

tape( 'the exported value is a double-precision floating-point number equal to the square root of 2', function test( t ) {
var expected = sqrt( 2 );
t.equal( SQRT2, expected, 'equals sqrt(2)' );
t.equal( SQRT2, expected, 'returns expected value' );
t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ tape( 'main export is a number', function test( t ) {
});

tape( 'export is a double-precision floating-point number equal to 6.283185307179586', function test( t ) {
t.equal( TWO_PI, 6.283185307179586, 'equals 6.283185307179586' );
t.equal( TWO_PI, 6.283185307179586, 'returns expected value' );
t.end();
});