Skip to content

test: migrate math/base/special/atandf to ULP-based testing#13639

Closed
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-atandf
Closed

test: migrate math/base/special/atandf to ULP-based testing#13639
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-atandf

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

This pull request migrates test/test.js and test/test.native.js of math/base/special/atandf from relative-tolerance (EPS-based) assertions to ULP-difference assertions via @stdlib/number/float32/base/assert/is-almost-same-value, following the merged precedent for single-precision packages (e.g. math/base/special/hypotf, PR #12808).

  • Replaces the delta/tol/EPS/absf-based tolerance checks in both the "negative values" and "positive values" test cases with t.strictEqual( isAlmostSameValue( y, e, 1 ), true, 'returns expected value' ).
  • Removes the now-unused absf and EPS requires; keeps the existing float64ToFloat32 coercion of fixture expected values (unchanged from before).
  • Minimum required ULP value: 1 for both the JavaScript and native implementations, verified by direct ULP-difference computation over both fixture files (negative.json, positive.json; combined 4009 assertions). The native add-on was built locally (make install-node-addons NODE_ADDONS_PATTERN=atandf) and its outputs were independently checked for max ULP difference against the fixtures (native negative: 1, native positive: 1; JS negative: 1, JS positive: 1).
  • Ran the full test suite for the package twice (make test TESTS_FILTER=".*/math/base/special/atandf/.*") at ULP=1 to confirm deterministic passing (4009/4009 both runs, both files).
  • npx eslint is clean on both changed files.
  • No other files were changed.

Related Issues

Questions

No.

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 authored by an automated Claude Code agent running as a scheduled task, following the conventions established in prior merged ULP-migration PRs for this issue (e.g. #12808, #12799).


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Jul 24, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

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

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/atandf $\\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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants