Skip to content

test: migrate constants/float32/ln-ten to ULP-based assertions - #16059

Merged
kgryte merged 2 commits into
developfrom
philipp/ulp-constants-float32-ln-ten
Oct 11, 2026
Merged

kgryte merged 2 commits into
developfrom
philipp/ulp-constants-float32-ln-ten

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests of constants/float32/ln-ten from an EPS-based tolerance to ULP-based assertions using @stdlib/number/float32/base/assert/is-almost-same-value.
  • uses a single named constant ULP = 0. This is the measured minimum: the constant equals lnf(10) exactly (tests pass for N = 64, 4, 2, 1, and 0, and were run twice at the final value).

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?

Since the measured minimum is 0 ULP, the comparison is equivalent to an exact check; reviewers may prefer a plain strictEqual here.

Other

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

The commit was made with --no-verify because the pre-commit editorconfig linter could not download its binary in the sandbox; eslint was run on the changed file and is clean.

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

This PR was written by Claude Code as an automated scheduled task.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_015n5joeotRty3pC31s5Zgjd


Generated by Claude Code

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

stdlib-bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float32/ln-ten $\\color{green}55/55$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}0/0$
$\\color{green}+0.00\\%$
$\\color{green}55/55$
$\\color{green}+0.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 11, 2026
@kgryte
kgryte marked this pull request as ready for review October 11, 2026 12:21
@kgryte
kgryte requested a review from a team October 11, 2026 12:21
Comment thread lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js Outdated
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 11, 2026
Comment thread lib/node_modules/@stdlib/constants/float32/ln-ten/test/test.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after clean-up.

@kgryte
kgryte merged commit 3560347 into develop Oct 11, 2026
12 checks passed
@kgryte
kgryte deleted the philipp/ulp-constants-float32-ln-ten branch October 11, 2026 12:31
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 11, 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.

4 participants