test: migrate stats/base/dists/pareto-type1/quantile to ULP-based assertions - #14129
Merged
Conversation
…ssertions Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vL4WsqC1a6DU6VewVmvx5
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Member
|
An automated check found potentially unrelated issue/PR references in this PR:
Why this matters: GitHub automatically closes issues referenced with What to do:
This assessment was generated by an AI model and is informational only. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
@stdlib/stats/base/dists/pareto-type1/quantiletests from relative tolerance (EPS/delta/tol) comparisons to ULP-based assertions using@stdlib/assert/is-almost-same-value, per [RFC]: Migratemath/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352.Converted files:
test/test.quantile.jstest/test.factory.jstest/test.native.jstest/test.jsonly performs exact export checks and was left unchanged.ULP bounds
All three fixture loops (
both_large.json,large_alpha.json,large_beta.json) use:test.quantile.js1.0 * EPS * abs( expected[i] )00test.factory.js1.0 * EPS * abs( expected[i] )00test.native.js1.0 * EPS * abs( expected[i] )00The bound was determined empirically: the minimum ULP distance was computed for every fixture value in all three fixture files, and the maximum observed distance was
0— i.e., every returned value is bit-identical to the Julia reference value, so0is the tightest possible bound. The suite was run twice at the final value to confirm determinism.Related Issues
This pull request has the following related issues:
math/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352Questions
The native add-on was not compiled in the environment used to measure the bound, so
test/test.native.jswas skipped locally and its0ULP bound is inferred rather than directly measured. The inference is thatsrc/main.ccomputesbeta / stdlib_base_pow( 1.0-p, 1.0/alpha )using stdlib's ownpowport — the same expression and same algorithm aslib/main.js— so results are expected to be bit-identical. Please confirm against a build with add-ons enabled; if native results diverge, the native bound will need to be raised.Other
etc/eslint/.eslintrc.tests.js(clean). Theeditorconfig-checkerpre-commit step could not download its binary in this environment; EditorConfig compliance (LF, tab indentation, no trailing whitespace, final newline) was verified manually instead.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, which studied the prior ULP migrations in this family (e.g.
stats/base/dists/chi/quantile,stats/base/dists/pareto-type1/kurtosis), applied the same idiom, and measured the minimum ULP bound over the full fixture set.@stdlib-js/reviewers
Generated by Claude Code