Skip to content

test: migrate math/base/special/asind to ULP-based testing - #13899

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-asind
Aug 4, 2026
Merged

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

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 the test suite for math/base/special/asind from relative tolerance testing to ULP (unit in the last place) difference testing, per the tracking issue.
  • replaces the delta/tol-based tolerance checks in test/test.js and test/test.native.js with t.strictEqual( isAlmostSameValue( y, expected[ i ], 2 ), true, 'returns expected value' ), using @stdlib/assert/is-almost-same-value.
  • removes the now-unused abs import from both test files (the EPS import is retained, as it is still used elsewhere in the tests for domain-boundary checks).
  • the ULP bound (2) was determined empirically: starting from a high bound (64) and lowering it until the minimum integer value that still passes over the full fixture set (6011 assertions across both the negative- and positive-value fixtures) was found. The test suite was run twice at this bound to confirm deterministic results.

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.

  • Read, understood, and followed the [contributing guidelines][contributing].

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 by Claude Code, which searched the repository for a candidate package, studied several already-merged conversions in the same tracking issue to mirror the exact idiom used, and empirically determined the minimum ULP bound by running the test suite locally.


@stdlib-js/reviewers


Generated by Claude Code

@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 Aug 3, 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/asind $\\color{green}185/185$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}185/185$
$\\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 August 3, 2026 22:00
@Planeshifter
Planeshifter requested a review from a team August 3, 2026 22:00
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 3, 2026
@kgryte kgryte added Tests Pull requests specifically adding tests. and removed Needs Review A pull request which needs code review. labels Aug 4, 2026
@kgryte
kgryte merged commit efa3ea8 into develop Aug 4, 2026
87 checks passed
@kgryte
kgryte deleted the philipp/ulp-asind branch August 4, 2026 00:46
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