Skip to content

test: migrate constants/float64/ln-ten to ULP-based assertions - #16177

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-constants-float64-ln-ten
Oct 15, 2026
Merged

kgryte merged 1 commit into
developfrom
kgryte/ulp-constants-float64-ln-ten

Conversation

@kgryte

@kgryte kgryte commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

The single converted assertion is

t.strictEqual( isAlmostSameValue( v, LN10, 0 ), true, 'returns expected value' );

Final ULP bound: 0. This is the measured minimum. ln( 10.0 ) returns 2.302585092994046, which is bit-for-bit equal to the exported constant (v === LN10), so the ULP difference is zero and no slack is required. Starting from a loose bound and tightening, every value down to 0 passes; 0 is the smallest permissible non-negative integer, so the bound cannot be tightened further. The suite was run twice at the final bound to confirm determinism.

Only the test file is changed:

lib/node_modules/@stdlib/constants/float64/ln-ten/test/test.js | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

Verification:

  • make test TESTS_FILTER=".*/constants/float64/ln-ten/.*" → 4/4 passing (run twice, identical results).
  • make lint FILES=".../constants/float64/ln-ten/test/test.js" → clean, as is a direct eslint --config etc/eslint/.eslintrc.tests.js run over the changed file.

Note: lint-editorconfig-files could not run in this environment, as the editorconfig-checker wrapper fetches its binary from GitHub releases at runtime and outbound access to that endpoint is blocked. The changed lines were checked by hand for tab indentation, LF endings, absence of trailing whitespace, and a final newline.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was authored by Claude Code running as an unattended scheduled task. It selected the package, mirrored the migration idiom from previously merged conversions in the same family, determined the minimum ULP bound empirically, and ran the package tests and test linter locally.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_019PKXNbNJLknf9kKPnx9jXh

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Oct 15, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float64/ln-ten $\\color{green}51/51$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}0/0$
$\\color{green}+100.00\\%$
$\\color{green}51/51$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Oct 15, 2026
@kgryte
kgryte marked this pull request as ready for review October 15, 2026 19:56
@kgryte
kgryte requested a review from a team October 15, 2026 19:56
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 15, 2026
@kgryte
kgryte merged commit fa0bc59 into develop Oct 15, 2026
70 checks passed
@kgryte
kgryte deleted the kgryte/ulp-constants-float64-ln-ten branch October 15, 2026 19:57
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants