Skip to content

test: migrate stats/base/dists/planck/stdev to ULP-based assertions - #14395

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-base-dists-planck-stdev
Aug 19, 2026
Merged

test: migrate stats/base/dists/planck/stdev to ULP-based assertions#14395
kgryte merged 1 commit into
developfrom
kgryte/ulp-stats-base-dists-planck-stdev

Conversation

@kgryte

@kgryte kgryte commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

Details:

  • Package converted: stats/base/dists/planck/stdev (test/test.js and test/test.native.js).
  • Final ULP constant: 1 in both test/test.js and test/test.native.js.
  • Measured minimum: starting from a loose bound and tightening, 1 is the smallest integer bound under which the full 1000-value fixture set passes for both the JavaScript and C implementations. At 0, 273 of the 1000 fixture assertions fail in each file (727 fixture values are bit-for-bit exact), so the bound cannot be tightened further.
  • Determinism: the suite was run twice at the final bound, with the native add-on compiled locally so test/test.native.js actually executed rather than being skipped. Both runs: 1005 assertions, 1005 passing, in each of the two test files.
  • Linting is clean for both files under etc/eslint/.eslintrc.tests.js, and the only changed files are the two test files.

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 conversion mirrors the idiom already used in the same family (e.g., stats/base/dists/halfnormal/stdev): the fixture loop drops the exact-vs-tolerance branch entirely in favor of a single t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); assertion.

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 authored by Claude Code, running unattended as a scheduled task, which selected the package, mirrored the conversion idiom from previously merged conversions, and empirically determined and verified the minimum ULP bound.


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. labels Aug 19, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/planck/stdev $\\color{green}166/166$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}166/166$
$\\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 19, 2026
@kgryte
kgryte marked this pull request as ready for review August 19, 2026 07:00
@kgryte
kgryte requested a review from a team August 19, 2026 07:00
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 19, 2026
@kgryte
kgryte merged commit 83cf8cb into develop Aug 19, 2026
82 checks passed
@kgryte
kgryte deleted the kgryte/ulp-stats-base-dists-planck-stdev branch August 19, 2026 07:00
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 19, 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. Statistics Issue or pull request related to statistical functionality. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants