Skip to content

test: migrate math/base/special/asinf to ULP-based testing - #14111

Merged
kgryte merged 1 commit into
stdlib-js:developfrom
ujjwalv01:test-math-base-special-asinf-ulp
Aug 10, 2026
Merged

kgryte merged 1 commit into
stdlib-js:developfrom
ujjwalv01:test-math-base-special-asinf-ulp

Conversation

@ujjwalv01

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests for math/base/special/asinf from computed relative tolerance (EPS-scaled delta <= tol) checks to ULP-based assertions;
  • replaces the @stdlib/math/base/special/abs require with @stdlib/number/float32/base/assert/is-almost-same-value. (The EPS constant is retained as it is utilized for boundary generation tests).
  • both test/test.js and test/test.native.js are modified to use the new ULP assertions.

ULP bounds (one per fixture set, each tightened to the measured minimum):

fixture set previous tolerance ULP bound
data 3.3 * EPS 5
small_negative 1.0 * EPS 0
small_positive 1.0 * EPS 0

Each bound is the smallest non-negative integer for which every fixture in the corresponding set passes. Starting from a high bound and lowering, the suite passes at the values above (8014/8014 assertions), and decrementing each bound by one produces exactly one failure per set, confirming that no bound can be tightened further.

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.

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

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@ujjwalv01
ujjwalv01 requested a review from a team August 10, 2026 01:52
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Aug 10, 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!

@ujjwalv01 ujjwalv01 closed this Aug 10, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 10, 2026
@ujjwalv01 ujjwalv01 reopened this Aug 10, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/asinf $\\color{green}295/295$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}295/295$
$\\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 Aug 10, 2026
@kgryte
kgryte merged commit 7d4ba42 into stdlib-js:develop Aug 10, 2026
94 checks passed
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.

3 participants