Skip to content

test: migrate stats/base/dists/rayleigh/logpdf to ULP-based assertions - #16294

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-stats-base-dists-rayleigh-logpdf
Oct 23, 2026
Merged

kgryte merged 1 commit into
developfrom
philipp/ulp-stats-base-dists-rayleigh-logpdf

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates the JavaScript tests in stats/base/dists/rayleigh/logpdf/test/test.logpdf.js from computed EPS-based tolerances to isAlmostSameValue ULP-based assertions. The ULP count is passed inline as an integer literal. The final values, tightened to the measured minimum that passes over the full fixture set (stable across two runs):
    • small scale parameter fixtures (small_scale.json): 24 ULPs (previously 15*EPS relative tolerance; 23 fails)
    • medium scale parameter fixtures (medium_scale.json): 2 ULPs (1 fails)
    • large scale parameter fixtures (large_scale.json): 2 ULPs (1 fails)
  • test.factory.js and test.native.js already use ULP-based assertions and are unchanged.

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

This PR was written primarily by Claude Code (automated routine), including the search for the minimal ULP bounds.


@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 Oct 22, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/rayleigh/logpdf $\\color{green}297/297$
$\\color{green}+100.00\\%$
$\\color{green}29/29$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}297/297$
$\\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 Oct 23, 2026
@kgryte
kgryte marked this pull request as ready for review October 23, 2026 18:40
@kgryte
kgryte requested a review from a team October 23, 2026 18:40
@kgryte
kgryte merged commit d2b4777 into develop Oct 23, 2026
66 checks passed
@kgryte
kgryte deleted the philipp/ulp-stats-base-dists-rayleigh-logpdf branch October 23, 2026 18:41
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Oct 23, 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.

4 participants