Skip to content

test: migrate stats/incr/nanrmse to ULP-based assertions - #16138

Merged
kgryte merged 1 commit into
developfrom
philipp/ulp-stats-incr-nanrmse
Oct 14, 2026
Merged

kgryte merged 1 commit into
developfrom
philipp/ulp-stats-incr-nanrmse

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests of @stdlib/stats/incr/nanrmse from EPS/tolerance-based assertions to ULP-based assertions using @stdlib/assert/is-almost-same-value.
  • passes the ULP count as an inline integer literal. All three call sites (the main fixture loop, the NaN-ignoring loop, and the no-argument "current value" test) were tightened from an initial 64 down to the measured minimum of 0 ULPs (results are exactly equal to the reference computation; the previous tolerance was 1.0 * EPS * abs(expected)). The suite was run twice at the final values with identical, passing results.
  • removes the now-unused abs and EPS requires and the delta/tol variables.

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 as an automated routine.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01H6cmvnBMEXmQiUxa1oiEHW


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6cmvnBMEXmQiUxa1oiEHW
@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 14, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/nanrmse $\\color{green}129/129$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}129/129$
$\\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 14, 2026
@kgryte
kgryte marked this pull request as ready for review October 14, 2026 10:00
@kgryte
kgryte requested a review from a team October 14, 2026 10:00
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 14, 2026
@kgryte
kgryte merged commit cda73b3 into develop Oct 14, 2026
85 of 86 checks passed
@kgryte
kgryte deleted the philipp/ulp-stats-incr-nanrmse branch October 14, 2026 10:00
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 14, 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