Skip to content

test: migrate math/base/special/ccis to ULP-based assertions - #14194

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-ccis
Aug 12, 2026
Merged

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

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 math/base/special/ccis test cases from relative-tolerance (EPS-scaled delta/tol) comparisons to ULP-based assertions using @stdlib/assert/is-almost-same-value, per the RFC in [RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352.
  • Updates both test/test.js and test/test.native.js.
  • Measured the minimum ULP threshold that still passes over the full fixture set (pure_real.json, general_complex.json), confirmed deterministic across three consecutive local runs (including a build of the native addon via node-gyp):
    • test.js (pure JS implementation): 0 ULP for both the real and imaginary components, across both fixture sets (exact bit-for-bit match against the reference fixtures).
    • test.native.js (native addon): 0 ULP for both the real and imaginary components, across both fixture sets (also an exact match).

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 for math/base/special/ccis were changed; no other packages were touched.
  • Verified: make test TESTS_FILTER=".*/math/base/special/ccis/.*" passes (2018/2018 for both test.js and the native addon build of test.native.js), run three times to confirm determinism, and make eslint-tests TESTS_FILTER=".*/math/base/special/ccis/.*" (the repo's test-specific ESLint config) is clean on both files.
  • Studied prior-art conversions of similar complex-valued packages (e.g. math/base/special/cexp, and the reference commit 121f2c0 linked from the RFC) to mirror the exact idiom, including using literal per-assertion ULP values (rather than a single named constant) since that matches the convention used across all merged conversions in this codebase to date.

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

This PR was written entirely by Claude Code (an automated, unattended session), including discovering the candidate package, checking for collisions with existing/prior ULP-migration PRs, studying prior-art conversions (e.g. math/base/special/cexp), rewriting the test assertions, building the native addon locally to measure the native-implementation ULP threshold empirically, and verifying determinism across repeated runs. It is left as a draft specifically so a human can review it before it is considered for merge, given issue #11352 encourages contributors to author these migrations manually.


@stdlib-js/reviewers


Generated by Claude Code

Ref: #11352

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@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 12, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/ccis $\\color{green}198/198$
$\\color{green}+100.00\\%$
$\\color{green}6/6$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}198/198$
$\\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 12, 2026
@kgryte
kgryte marked this pull request as ready for review August 12, 2026 23:06
@kgryte
kgryte requested a review from a team August 12, 2026 23:06
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 12, 2026
@kgryte
kgryte merged commit 1811a32 into develop Aug 12, 2026
80 checks passed
@kgryte
kgryte deleted the philipp/ulp-ccis branch August 12, 2026 23:06
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 12, 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. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants