Skip to content

test: migrate math/base/special/acscdf to ULP-based testing - #13673

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

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

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 test/test.js and test/test.native.js in math/base/special/acscdf from relative-tolerance (EPS-scaled delta/tol) assertions to ULP-difference assertions via @stdlib/number/float32/base/assert/is-almost-same-value (the single-precision variant, following the precedent of asecdf, as acscdf is a single-precision function).
  • uses the minimum required ULP value (2) for both the negative and positive fixture test blocks. This was determined empirically: ULP = 1 fails (142 of 6009 assertions), ULP = 2 passes all 6009 assertions, confirmed deterministic across multiple consecutive runs. A direct computation of the ULP distance between actual and expected values over both fixture sets confirms a max distance of 2 ULPs in each case.
  • removes the now-unused abs require and delta/tol variables, and collapses the obsolete exact-equality short-circuit branches. The EPS require is retained, as it is still used by the uniform() domain-guard NaN tests.

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.

The native add-on could not be built in this sandboxed environment (no node-gyp/toolchain available), so test/test.native.js could not be executed directly; however, it mirrors the same ULP value (2) as the JS test, consistent with prior conversions in this series (e.g. cscd, #13664) that noted the same limitation.

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 (test migration and minimum-ULP determination via direct computation of ULP distance over the fixture sets).


@stdlib-js/reviewers


Generated by Claude Code

Replaces the relative-tolerance (EPS-scaled delta/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, following the
precedent set by asecdf (single-precision variant, per #11352).

Minimum required ULP value is 2 for both the negative and positive
fixture blocks, determined by computing the maximum ULP distance
between actual and expected values over both fixture sets.
@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 26, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/acscdf $\\color{green}197/197$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}197/197$
$\\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 23:41
@kgryte
kgryte requested a review from a team July 26, 2026 23:41
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 26, 2026
@kgryte
kgryte merged commit 57a432c into develop Jul 26, 2026
86 checks passed
@kgryte
kgryte deleted the philipp/ulp-acscdf branch July 26, 2026 23:41
@kgryte kgryte removed the Needs Review A pull request which needs code review. 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