From 79f46896af6cafec93f5ff36bf506f7a25837b4d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Oct 2026 09:16:53 +0000 Subject: [PATCH 1/2] test: migrate `constants/float32/ln-ten` to ULP-based assertions Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_015n5joeotRty3pC31s5Zgjd --- .../constants/float32/ln-ten/test/test.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js b/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js index 3b4e37005ab6..fc6dd1699f49 100644 --- a/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js +++ b/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js @@ -22,11 +22,15 @@ var tape = require( 'tape' ); var lnf = require( '@stdlib/math/base/special/lnf' ); -var absf = require( '@stdlib/math/base/special/absf' ); -var EPS = require( '@stdlib/constants/float32/eps' ); +var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); var FLOAT32_LN10 = require( './../lib' ); +// VARIABLES // + +var ULP = 0; + + // TESTS // tape( 'main export is a number', function test( t ) { @@ -41,14 +45,7 @@ tape( 'export is a single-precision floating-point number equal to `2.3025851249 }); tape( 'export equals `lnf(10)`', function test( t ) { - var delta; - var tol; - var v; - - v = lnf( 10.0 ); - delta = absf( v - FLOAT32_LN10 ); - tol = EPS * FLOAT32_LN10; - - t.ok( delta <= tol, 'equals lnf(10) within tolerance '+tol ); + var v = lnf( 10.0 ); + t.strictEqual( isAlmostSameValue( v, FLOAT32_LN10, ULP ), true, 'returns expected value' ); t.end(); }); From ce0b95d943813100ceb8a95ac0505b08b2abf887 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 11 Oct 2026 14:22:21 +0200 Subject: [PATCH 2/2] Apply batched suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/constants/float32/ln-ten/test/test.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js b/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js index fc6dd1699f49..c22e5495191d 100644 --- a/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js +++ b/lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js @@ -26,11 +26,6 @@ var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-s var FLOAT32_LN10 = require( './../lib' ); -// VARIABLES // - -var ULP = 0; - - // TESTS // tape( 'main export is a number', function test( t ) { @@ -46,6 +41,6 @@ tape( 'export is a single-precision floating-point number equal to `2.3025851249 tape( 'export equals `lnf(10)`', function test( t ) { var v = lnf( 10.0 ); - t.strictEqual( isAlmostSameValue( v, FLOAT32_LN10, ULP ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValue( v, FLOAT32_LN10, 0 ), true, 'returns expected value' ); t.end(); });