Skip to content

test: migrate stats/base/dists/logistic/median to ULP-based assertions - #15825

Closed
Planeshifter wants to merge 2 commits into
developfrom
philipp/ulp-stats-base-dists-logistic-median
Closed

Planeshifter wants to merge 2 commits into
developfrom
philipp/ulp-stats-base-dists-logistic-median

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves #{{TODO: add issue number}}.

Description

What is the purpose of this pull request?

This pull request:

  • migrates stats/base/dists/logistic/median tests (test/test.js) from an EPS-based tolerance comparison to isAlmostSameValue ULP-based assertions, using a single named constant MAX_ULP.
  • tightens MAX_ULP to the measured minimum: starting from 64, the full fixture set passes at 0 ULP (exact), so the constant is set to 0. The suite was run repeatedly at the final value with identical, passing results.
  • leaves test/test.native.js unchanged, as it already uses exact comparisons.

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_01D5XYK6zMpPkYFZvhJtQJhc


Generated by Claude Code

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

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/logistic/median $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\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 12, 2026
@kgryte kgryte added the autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. label Oct 12, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit.

Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

@stdlib-bot stdlib-bot closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. 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