Skip to content

test: migrate math/base/special/atanh to ULP-based testing#13646

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-atanh
Jul 24, 2026
Merged

test: migrate math/base/special/atanh to ULP-based testing#13646
kgryte merged 1 commit into
developfrom
philipp/ulp-atanh

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/atanh test fixtures from relative-tolerance (EPS-scaled delta/tol) comparisons to ULP-difference assertions using @stdlib/assert/is-almost-same-value, per the RFC in [RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352.
  • Converts both test/test.js and test/test.native.js.
  • Final ULP bound: 1 for all four fixture-based test blocks (negative, positive, small negative, small positive values). Measured minimum required ULP difference across all 8,012 fixture points (2,003 points × 4 fixture sets) was 0 (exact matches in this environment); 1 is used as the minimum safe integer bound consistent with the convention used in sibling conversions (e.g., math/base/special/asinh) to allow for architecture/FMA-related rounding variance. Verified deterministic by running the full test suite twice.
  • No other test cases (edge cases for ±Infinity, ±0, NaN, and out-of-domain inputs) were changed.

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 autonomously by Claude Code as part of a scheduled automation task, including candidate discovery, the test-file conversion, and ULP-bound measurement. It was opened as a draft for maintainer review.


@stdlib-js/reviewers


Generated by Claude Code

Replaces relative-tolerance (EPS-scaled delta/tol) fixture comparisons
with `isAlmostSameValue` ULP-difference assertions (maxULP=1) in
test.js and test.native.js, per #11352.
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Good First PR A pull request resolving a Good First Issue. labels Jul 24, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/atanh $\\color{green}248/248$
$\\color{green}+100.00\\%$
$\\color{green}24/24$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}248/248$
$\\color{green}+100.00\\%$

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

@Planeshifter
Planeshifter marked this pull request as ready for review July 24, 2026 21:46
@Planeshifter
Planeshifter requested review from a team and kgryte July 24, 2026 21:46
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 24, 2026
@kgryte kgryte added Tests Pull requests specifically adding tests. and removed Needs Review A pull request which needs code review. labels Jul 24, 2026
@kgryte
kgryte merged commit 4126e28 into develop Jul 24, 2026
88 checks passed
@kgryte
kgryte deleted the philipp/ulp-atanh branch July 24, 2026 22:04
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