Skip to content

test: migrate constants/float64/ln-two-pi to ULP-based assertions - #15855

Merged
kgryte merged 2 commits into
developfrom
philipp/ulp-constants-float64-ln-two-pi
Oct 12, 2026
Merged

kgryte merged 2 commits into
developfrom
philipp/ulp-constants-float64-ln-two-pi

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves a task from #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates the ln(2*pi) assertion in constants/float64/ln-two-pi from an EPS-based tolerance to isAlmostSameValue from @stdlib/assert/is-almost-same-value.
  • uses a single named ULP constant of 1, which is the measured minimum that passes (0 ULP fails, since ln( 2.0*PI ) differs from the constant by 1 ULP). The suite was run twice at this value with identical, passing results.

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.

Only test/test.js is changed; ESLint passes.

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 written primarily by Claude Code (scheduled routine).


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_0157PdQFGkHiseLjJiHZNFNP


Generated by Claude Code

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

stdlib-bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float64/ln-two-pi $\\color{green}52/52$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}0/0$
$\\color{green}+0.00\\%$
$\\color{green}52/52$
$\\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 12, 2026
@kgryte
kgryte marked this pull request as ready for review October 12, 2026 13:22
@kgryte
kgryte requested a review from a team October 12, 2026 13:22
Comment thread lib/node_modules/@stdlib/constants/float64/ln-two-pi/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/constants/float64/ln-two-pi/test/test.js Outdated
Comment thread lib/node_modules/@stdlib/constants/float64/ln-two-pi/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 29c6c92 into develop Oct 12, 2026
12 checks passed
@kgryte
kgryte deleted the philipp/ulp-constants-float64-ln-two-pi branch October 12, 2026 14:01
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Oct 12, 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