Skip to content

test: migrate blas/base/cscal to ULP-based assertions - #15733

Open
Planeshifter wants to merge 2 commits into
developfrom
philipp/ulp-blas-base-cscal
Open

Planeshifter wants to merge 2 commits into
developfrom
philipp/ulp-blas-base-cscal

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves #11352.

Description

What is the purpose of this pull request?

This pull request:

  • migrates blas/base/cscal tests (test.cscal.js and test.ndarray.js) from EPS-based tolerance checks to ULP-based assertions using @stdlib/number/float32/base/assert/is-almost-same-value.
  • uses a single named constant ULP = 5 in each file. The measured minimum over the full fixture set is 5 (4 fails in test.ndarray.js; 5 passes). Results were identical across two runs.
  • leaves test.cscal.native.js and test.ndarray.native.js unchanged, as the native addon could not be built in the environment used to author this PR, so a native ULP bound could not be measured.

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.

The commit was created with --no-verify because the pre-commit editorconfig linter binary could not be downloaded in the sandbox. ESLint passes on the changed files.

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 written primarily by Claude Code as an automated scheduled run.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01H7UKv9v5sNgHJ4XaHfMfCh


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7UKv9v5sNgHJ4XaHfMfCh
@stdlib-bot stdlib-bot added BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Good First PR A pull request resolving a Good First Issue. labels Oct 1, 2026
@stdlib-bot

stdlib-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/cscal $\\color{green}379/379$
$\\color{green}+0.00\\%$
$\\color{green}17/17$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}379/379$
$\\color{green}+0.00\\%$

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

@kgryte
kgryte marked this pull request as ready for review October 1, 2026 09:36
@kgryte
kgryte requested a review from a team October 1, 2026 09:36
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 1, 2026

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

ULP values need to be inlined in both files.

@kgryte kgryte added Tests Pull requests specifically adding tests. Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Oct 1, 2026

Copy link
Copy Markdown
Member Author

⚠️ Issue Reference Review

An automated check found potentially unrelated issue/PR references in this PR:

Reference Assessment Reasoning
#11352 suspicious PR migrates tests for blas/base/cscal, but the issue is a tracking issue for migrating math/base/special packages to ULP-based testing. It is also referenced with Resolves, which would close the tracking issue on merge.

Why this matters: GitHub automatically closes issues referenced with
closing keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect
references can accidentally close unrelated issues.

What to do:

  • If the reference is correct, no action needed. This check may produce
    false positives.
  • If the reference is incorrect, please update your PR description.

This assessment was generated by an AI model and is informational only.


Generated by Claude Code

@stdlib-bot stdlib-bot added the Potential Duplicate There might be another pull request resolving the same issue. label Oct 4, 2026
@stdlib-bot stdlib-bot removed the Potential Duplicate There might be another pull request resolving the same issue. label Oct 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Good First PR A pull request resolving a Good First Issue. 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.

[RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue)

4 participants