From 07e6f61a36325a81f5f593351385ccbcbd090ce5 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Thu, 15 Oct 2026 18:24:40 +0000 Subject: [PATCH] test: migrate `constants/float64/ln-ten` to ULP-based assertions Ref: https://github.com/stdlib-js/stdlib/issues/11352 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019PKXNbNJLknf9kKPnx9jXh --- .../@stdlib/constants/float64/ln-ten/test/test.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float64/ln-ten/test/test.js b/lib/node_modules/@stdlib/constants/float64/ln-ten/test/test.js index 5e11bf47bea6..e33c5cf0644e 100644 --- a/lib/node_modules/@stdlib/constants/float64/ln-ten/test/test.js +++ b/lib/node_modules/@stdlib/constants/float64/ln-ten/test/test.js @@ -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 LN10 = require( './../lib' ); @@ -41,14 +40,7 @@ tape( 'export is a double-precision floating-point number equal to `2.3025850929 }); tape( 'export equals `ln(10)`', function test( t ) { - var delta; - var tol; - var v; - - v = ln( 10.0 ); - delta = abs( v - LN10 ); - tol = EPS * LN10; - - t.ok( delta <= tol, 'equals ln(10) within tolerance '+tol ); + var v = ln( 10.0 ); + t.strictEqual( isAlmostSameValue( v, LN10, 0 ), true, 'returns expected value' ); t.end(); });