test: migrate stats/base/dists/pareto-type1/cdf to ULP-based assertions - #13941
Open
Planeshifter wants to merge 1 commit into
Open
test: migrate stats/base/dists/pareto-type1/cdf to ULP-based assertions#13941Planeshifter wants to merge 1 commit into
stats/base/dists/pareto-type1/cdf to ULP-based assertions#13941Planeshifter wants to merge 1 commit into
Conversation
…ions Replaces the EPS-based relative-tolerance idiom (`delta`/`tol`) in test.cdf.js, test.factory.js, and test.native.js with `isAlmostSameValue` at a measured-minimum ULP bound of 1. Ref: #11352
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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.
Resolves a part of #11352.
Description
This pull request:
stats/base/dists/pareto-type1/cdftest suite from the old computed-tolerance idiom (delta/tolderived fromEPS) 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.test/test.cdf.js,test/test.factory.js,test/test.native.js.test/test.jswas left untouched (it only contains the exports smoke test; no tolerance comparisons).isAlmostSameValue( y, expected[i], 1 )across all three converted files.@stdlib/number/float64/base/ulp-difference) between actual and expected values across the full fixture set (large_alpha.json,large_beta.json,both_large.json; 3000 evaluations total, checked against both the directcdf()export and thefactory()-created function). The measured maximum ULP difference was 0 (every case is bit-exact against the Julia-generated fixtures in this environment). A bound of1was used rather than0to match the convention used throughout every other converted package in the codebase (no precedent package uses a bound of0for fixture-loop assertions) and to leave a minimal safety margin for the native (C) code path, which was not exercised in this sandboxed environment (see Other, below).Related Issues
This pull request has the following related issues:
math/base/specialpackages from relative tolerance testing to ULP difference testing (tracking issue) #11352Questions
No.
Other
test/test.native.jswas converted to mirror the JS test files exactly, but the native addon could not be built in this sandboxed session, so the (skip-gated) native tests did not execute here.package.jsondid not need updates, as@stdlib/assert/is-almost-same-valueresolves via existing monorepo module resolution (consistent with other converted packages, none of which added an explicitdevDependenciesentry for it either).npx eslintis clean on all three changed files.make lint-editorconfig-files) could not run in this sandboxed session: it attempts to download theeditorconfig-checkerbinary fromgithub.com/editorconfig-checker/editorconfig-checker, a repository outside this session's permitted GitHub access scope, and fails with a 403. This is an environment/tooling limitation unrelated to this diff's content (reproduces identically for an unmodified file). The diff was manually checked for indentation (tabs, no space-indentation) and trailing-whitespace/EOF-newline consistency with the surrounding unmodified code.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored end-to-end by an automated Claude Code agent running as a scheduled task on behalf of the repository owner, following the conventions established in prior merged ULP-migration PRs for this issue (e.g. #13847, #13868).
@stdlib-js/reviewers
Generated by Claude Code