Skip to content

test: migrate stats/base/dists/triangular/mean to ULP-based assertions - #15364

Open
Devansh-18155 wants to merge 1 commit into
stdlib-js:developfrom
Devansh-18155:devansh/ulp-triangular-mean
Open

Devansh-18155 wants to merge 1 commit into
stdlib-js:developfrom
Devansh-18155:devansh/ulp-triangular-mean

Conversation

@Devansh-18155

Copy link
Copy Markdown
Contributor

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • Migrates the relative tolerance assertions in stats/base/dists/triangular/mean tests to ULP difference assertions using @stdlib/assert/is-almost-same-value.
  • Both the JavaScript and C implementations reproduce the reference fixture values bit for bit and thus the minimum required ULP bound is 0.

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

I used AI assistance to apply the standard ULP pattern verify the minimum ULP bound.


@stdlib-js/reviewers

@Devansh-18155
Devansh-18155 requested a review from a team September 20, 2026 06:20
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Sep 20, 2026
@stdlib-bot

stdlib-bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/triangular/mean $\\color{green}189/189$
$\\color{green}+0.00\\%$
$\\color{green}11/11$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}189/189$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

@Devansh-18155
Devansh-18155 force-pushed the devansh/ulp-triangular-mean branch from 82c873a to ba5ad5b Compare September 20, 2026 06:28

Copy link
Copy Markdown
Member

⚠️ Issue Reference Review

An automated check found potentially unrelated issue/PR references in this PR:

Reference Assessment Reasoning
#11352 suspicious Issue #11352 is an RFC explicitly scoped to migrating math/base/special packages from relative-tolerance to ULP-based testing (its own instructions say to search for a package "in math/base/special"). This PR migrates tests for stats/base/dists/triangular/mean, which is outside the issue's stated scope.

Why this matters: GitHub automatically closes issues referenced with
closing keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect
references can accidentally close unrelated issues.

What to do:

  • If the reference is correct, no action needed. This check may produce
    false positives.
  • If the reference is incorrect, please update your PR description.

This assessment was generated by an AI model and is informational only.


Generated by Claude Code

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. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants