Skip to content

test: migrate math/base/special/asec to ULP-based assertions - #13989

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-asec
Aug 6, 2026
Merged

test: migrate math/base/special/asec to ULP-based assertions#13989
kgryte merged 1 commit into
developfrom
kgryte/ulp-asec

Conversation

@kgryte

@kgryte kgryte commented Aug 6, 2026

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

The ULP bounds were measured against the full fixture set (4006 fixture values across 8 Julia fixture files) and tightened to the minimum integer which still passes:

Fixture Interval ULP
medium_negative [-3.0,-1.0] 1
medium_positive [1.0,3.0] 1
large_positive [3.0,100.0] 1
large_negative [-100.0,-3.0] 1
larger_positive [100.0,1000.0] 1
larger_negative [-1000.0,-100.0] 1
huge_negative [-1e200,-1e208] 0
huge_positive [1e300,1e308] 0

The measured maximum ULP difference over each fixture equals the value used, so each bound is minimal (e.g., the huge_* fixtures are bit-for-bit exact, and lowering any 1 to 0 fails). The JavaScript and native C implementations were measured independently and agree exactly, so test/test.js and test/test.native.js use identical ULP values. Both suites were run twice at the final values to confirm determinism (4013 assertions passing per file, native add-on built locally).

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.

Only the two test files are changed; no source, fixture, or documentation changes.

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 authored by Claude Code, which studied the prior conversions in this tracking issue, applied the same idiom to math/base/special/asec, and measured the minimum ULP bounds empirically against the fixture data.


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Aug 6, 2026
@kgryte kgryte added the Tests Pull requests specifically adding tests. label Aug 6, 2026
@kgryte
kgryte marked this pull request as ready for review August 6, 2026 23:14
@kgryte
kgryte requested a review from a team August 6, 2026 23:14
@kgryte
kgryte merged commit 853e9d0 into develop Aug 6, 2026
16 checks passed
@kgryte
kgryte deleted the kgryte/ulp-asec branch August 6, 2026 23:14
@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.

@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. labels Aug 6, 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 Review A pull request which needs code review. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants