Skip to content

test: migrate math/base/special/acotf to ULP-based testing - #13659

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-acotf
Jul 26, 2026
Merged

kgryte merged 1 commit into
developfrom
philipp/ulp-acotf

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates math/base/special/acotf test cases from relative-tolerance-based assertions (EPS/abs/tol idiom) to ULP-based assertions using @stdlib/number/float32/base/assert/is-almost-same-value in both test/test.js and test/test.native.js.
  • uses measured minimum ULP bounds per fixture set: 3 for medium_positive/medium_negative, 2 for large_positive/large_negative/larger_positive/larger_negative, and 1 for huge_positive/huge_negative. Each bound is the smallest integer for which the full fixture set passes (verified by lowering to N-1 and confirming at least one failure in every group).
  • test suite was run twice at the final ULP bounds for both test.js and the native binding (test.native.js, built locally via node-gyp rebuild) to confirm deterministic results (no FMA/arch flakiness).

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.

Final ULP constants: 3 (medium), 2 (large/larger), 1 (huge).

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, running as an automated scheduled task: it discovered the candidate package, studied prior art from already-converted packages, performed the conversion, measured the tightest ULP bounds agentically, and verified the result.


@stdlib-js/reviewers


Generated by Claude Code

Replaces the relative-tolerance (EPS/abs/tol) assertions in test/test.js
and test/test.native.js with ULP-difference assertions via
`@stdlib/number/float32/base/assert/is-almost-same-value`, using the
minimum measured ULP bound for each fixture set.

Ref: #11352
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Jul 25, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/acotf $\\color{green}193/193$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}193/193$
$\\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 Jul 26, 2026
@kgryte
kgryte marked this pull request as ready for review July 26, 2026 07:17
@kgryte
kgryte requested a review from a team July 26, 2026 07:17
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 26, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jul 26, 2026
@kgryte
kgryte merged commit 4588717 into develop Jul 26, 2026
70 checks passed
@kgryte
kgryte deleted the philipp/ulp-acotf branch July 26, 2026 07:18
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Jul 26, 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. Math Issue or pull request specific to math functionality. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants