Skip to content
Merged
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
15 changes: 3 additions & 12 deletions lib/node_modules/@stdlib/constants/float64/ln-two/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
// MODULES //

var tape = require( 'tape' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var ln = require( '@stdlib/math/base/special/ln' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float64/eps' );
var LN2 = require( './../lib' );


Expand All @@ -41,15 +40,7 @@ tape( 'export is a double-precision floating-point number equal to `0.6931471805
});

tape( 'export equals `ln(2)`', function test( t ) {
var delta;
var tol;
var v;

v = ln( 2.0 );
delta = abs( v - LN2 );
tol = EPS * LN2;

t.ok( delta <= tol, 'equals ln(2) within tolerance '+tol );

var v = ln( 2.0 );
t.strictEqual( isAlmostSameValue( v, LN2, 0 ), true, 'returns expected value' );
t.end();
});
Loading