Skip to content

test: migrate math/base/special/asecd to ULP-based assertions - #13777

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-asecd
Draft

test: migrate math/base/special/asecd to ULP-based assertions#13777
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-asecd

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Summary

Migrates math/base/special/asecd test cases from relative-tolerance (EPS-scaled delta/tol) comparisons to ULP-difference assertions using @stdlib/assert/is-almost-same-value, per the guidance in #11352.

  • test/test.js and test/test.native.js both updated. The idiom mirrors the already-converted sibling package math/base/special/asecdf (float32 variant) and math/base/special/cotd.
  • Final ULP constant: ULP = 1 for both the negative-value and positive-value fixture blocks (used identically in both test.js and test.native.js).
  • This was determined empirically: ULP = 0 fails (887 of 6009 assertions fail), ULP = 1 passes all 6009 assertions, confirmed deterministic across two consecutive runs.
  • test/test.native.js mirrors the same ULP value as the JS tests; the native add-on could not be built/tested in this environment (tests skip via tryRequire), consistent with prior converted packages in this family.
  • No other files were changed.

Resolves a part of #11352.


Generated by Claude Code

Replaces EPS-scaled relative-tolerance comparisons in the fixture
loops with ULP-difference assertions via `@stdlib/assert/is-almost-same-value`,
mirroring the pattern used in `math/base/special/asecdf` and `cotd`.

Final ULP bound: 1 (measured minimum; ULP=0 fails 887/6009 assertions,
ULP=1 passes all 6009 deterministically across repeated runs).

Refs: #11352
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Jul 30, 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 30, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/asecd $\\color{green}188/188$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}188/188$
$\\color{green}+100.00\\%$

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

@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.

The OP needs to be updated as described in the comments.

@kgryte kgryte added Tests Pull requests specifically adding tests. Needs Changes Pull request which needs changes before being merged. labels Jul 30, 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. Needs Changes Pull request which needs changes before being merged. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants