Skip to content

test: migrate math/base/special/asec to ULP-based testing - #13789

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

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

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This PR migrates the test suite for math/base/special/asec from relative-tolerance testing to ULP difference testing, per the tracking issue.

  • Replaced the EPS/abs-based tolerance checks with @stdlib/number/float64/base/assert/is-almost-same-value.
  • All 8 fixture-based test blocks (medium/large/larger/huge, positive/negative) now use isAlmostSameValue( y, expected[ i ], 1 ).
  • Measured the minimum required ULP bound empirically by comparing every fixture value's computed ULP difference against expected; the maximum observed difference across all ~4000 fixture values (test.js and test.native.js) was 1 ULP, so 1 is used as the tightest bound.
  • Verified determinism by running the full suite twice at this bound with no flakiness.
  • test/test.js and test/test.native.js were updated identically (the native test just skips when no native addon is built, unchanged from before).

Only the package's own test files were changed; no other files were modified.

Resolves a part of #11352


Generated by Claude Code

@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

Hello! 👋

We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm!

Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks.

Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀

For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers!

@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/asec $\\color{green}160/160$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}160/160$
$\\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