fix: propagate fixes to blas/ext/base and stats/base/dists - #15039
Draft
Planeshifter wants to merge 3 commits into
Draft
fix: propagate fixes to blas/ext/base and stats/base/dists#15039Planeshifter wants to merge 3 commits into
blas/ext/base and stats/base/dists#15039Planeshifter wants to merge 3 commits into
Conversation
Propagates fixes from 2306e85 ("fix: ensure consistent behavior between JavaScript and C" in `blas/ext/base/clinspace`) and f29d4c7 (same fix in `blas/ext/base/clogspace`) to sibling single-precision packages whose JavaScript implementations compute the increment and per-iteration values in double precision, diverging from their C implementations which compute in single precision: - `blas/ext/base/slinspace` - `blas/ext/base/slogspace` Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136wJPUFFRGY8suFjHCCqXk
Propagates fix from d0a642c ("docs: update parameter type") to sibling distribution packages whose `lib/native.js` JSDoc parameter types drifted from the types documented in the corresponding `lib/main.js`: - `stats/base/dists/chi/{kurtosis,logpdf,pdf,skewness}` - `stats/base/dists/negative-binomial/variance` - `stats/base/dists/normal/cdf` - `stats/base/dists/planck/{kurtosis,logcdf,median,stdev,variance}` - `stats/base/dists/poisson/mgf` - `stats/base/dists/rayleigh/skewness` - `stats/base/dists/t/{logpdf,mean,median,mode,pdf,variance}` - `stats/base/dists/triangular/mean` - `stats/base/dists/truncated-normal/pdf` - `stats/base/dists/weibull/quantile` Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136wJPUFFRGY8suFjHCCqXk
Propagates fix from 80d3df7 ("chore: fix EditorConfig lint errors") to sibling tab-indented JSON prop files under `plot/ctor/lib/props`, which the repository EditorConfig requires to use two-space indentation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136wJPUFFRGY8suFjHCCqXk
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.
Description
This pull request:
developbetween 2026-09-05 (a730ce8ee) and 2026-09-06 (6eb47fed7) to sibling packages carrying the same underlying defects.Propagated fix (2306e85, f29d4c7):
slinspaceandslogspacehad the same JS/C divergence already fixed upstream inclinspace/clogspace: the JavaScriptndarray.jskernels computed the increment and each interpolated value in double precision, rounding to single precision only at the finalFloat32Arraystore, while the C implementations compute natively infloat. Both kernels now round through@stdlib/number/float64/base/to-float32after every intermediate operation — the increment, the multiply-accumulate, and, inslogspace, the exponent passed topowf— so intermediate rounding matches the C implementations instead of drifting on inputs where double- and single-precision rounding disagree.blas/ext/base/slinspaceblas/ext/base/slogspacePropagated fix (d0a642c): ("docs: update parameter type", PR #15002) corrected
lambda's@paramtype in thewald/{cdf,logcdf,logpdf}native wrappers from{number}to{NonNegativeNumber}, bringing the wrapper JSDoc in line with the input guard in each package'slib/main.js. We applied the same alignment across 27 drifted@paramtypes in 22 siblinglib/native.jsfiles, spanning chi, planck, t, negative-binomial, normal, poisson, rayleigh, triangular, truncated-normal, and weibull — each verified against its package's ownlib/main.jsguard rather than assumed from the pattern. Two corrections run the opposite direction: rayleigh/skewness's native type was over-restrictive (PositiveNumber→NonNegativeNumber) and triangular/mean's wrongly excluded negative support bounds (NonNegativeNumber→number).stats/base/dists/chi/{kurtosis,logpdf,pdf,skewness}stats/base/dists/negative-binomial/variancestats/base/dists/normal/cdfstats/base/dists/planck/{kurtosis,logcdf,median,stdev,variance}stats/base/dists/poisson/mgfstats/base/dists/rayleigh/skewnessstats/base/dists/t/{logpdf,mean,median,mode,pdf,variance}stats/base/dists/triangular/meanstats/base/dists/truncated-normal/pdfstats/base/dists/weibull/quantilePropagated fix (80d3df7): ("chore: fix EditorConfig lint errors", issue #14500) — same class of violation: these five sibling JSON files under
plot/ctor/lib/props/still carry tab indentation predating the.editorconfigtwo-space rule for[*.{json,json.txt}]; this PR re-indents them the same way, no other changes.plot/ctor/lib/props/engine/engines.jsonplot/ctor/lib/props/render-format/formats.jsonplot/ctor/lib/props/symbols/symbols.jsonplot/ctor/lib/props/viewer/viewers.jsonplot/ctor/lib/props/y-rug-orient/orientations.jsonRelated Issues
No related issues.
Questions
Should the
slinspace/slogspacekernels also roundstart/stopon entry? The C implementations receive them already cast tofloat, while the JS kernels receive raw doubles, so exact JS/C agreement for non-float32-representable endpoints would additionally require rounding the endpoints. This was deliberately left out to keep the change the exact analog of the source commits (whose inputs were pre-rounded viarealf/imagf).Other
Validation performed:
slinspace/slogspacetest suites was replayed against the modified kernels: all pass (all fixtures use exactly-representable float32 values, so the added rounding cannot alter existing expected values). All re-indented JSON files re-parse cleanly and are byte-identical apart from indentation.stats/base/dists/chi/mean/lib/native.js(itslib/main.jsguardsk < 0.0while its C implementation guardsk <= 0.0— that behavioral divergence should be resolved before documenting the wrapper's domain); sites requiring cross-package changes; campaign-owned migrations (ULP-based test assertions, doctest improvements,constants/float32/nanrefactors).negative-binomial/variance/lib/native.jsdescribesras "number of successes" whilelib/main.jssays "number of failures until experiment is stopped".Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running a scheduled fix-propagation routine: it identified generalizable fixes merged to
developin the last 24 hours, located sibling packages with the same defects, and applied the equivalent fixes after multi-pass validation. All changes were machine-generated and machine-validated; a maintainer should review before promoting from draft.🤖 Generated with Claude Code
https://claude.ai/code/session_0136wJPUFFRGY8suFjHCCqXk
Generated by Claude Code