style: add missing spaces#12920
Merged
kgryte merged 2 commits intoJun 16, 2026
Merged
Conversation
…istic/logpdf` Adds the missing space between the `//` and `NaN` token in the C source NaN-return comment, matching the form used by all 13 sibling C sources in `stats/base/dists/logistic/` (~93% conformance).
…ists/logistic/stdev` Adds the missing spaces around the `/` operator in the C source NaN-return expression, matching the form used by all 13 sibling C sources in `stats/base/dists/logistic/` (~93% conformance).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Jun 16, 2026
stats/base/dists/logistic/{logpdf,stdev}
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
Normalizes the C-source NaN-return whitespace in
stats/base/dists/logistic/logpdfandstats/base/dists/logistic/stdevto the canonical formreturn 0.0 / 0.0; // NaNused by the other 12 native-binding members of the namespace.Namespace summary
cdf,ctor,entropy,kurtosis,logcdf,logpdf,mean,median,mgf,mode,pdf,quantile,skewness,stdev,variance).src/main.c): 14 (ctoris a pure-JS constructor class and has none).return 0.0 / 0.0; // NaNstatement insrc/main.c.lib/factory.js(6/15 semantic split between factory-producing kernels and direct-arithmetic ones); thes < 0.0vss <= 0.0guard predicate (intentional cohort split between density/quantile-family and summary-statistic-family kernels);@returnsJSDoc type (no ≥75% majority).Per outlier package
stats/base/dists/logistic/logpdfsrc/main.cended the NaN-return guard withreturn 0.0 / 0.0; //NaN— no space between//andNaN. The 12 conforming sibling kernels (cdf,entropy,kurtosis,logcdf,mean,median,mgf,mode,pdf,quantile,skewness,variance; ~93% conformance among the 14 native-binding members of the namespace, withstdevbeing the other deviating package) use// NaNwith a single leading space, the convention applied uniformly across@stdlib's C-source comments.stats/base/dists/logistic/stdevsrc/main.cended the NaN-return guard withreturn 0.0/0.0; // NaN— no spaces around the division operator. The 12 conforming siblings (~93% conformance) use0.0 / 0.0with single spaces around/, matching the operator-spacing convention used throughout the namespace's NaN guards and throughout the@stdlibC sources more broadly. No behavioural change — the compiler emits identical IR.Related Issues
No.
Questions
No.
Other
Validation
package.jsonshape, README headings,manifest.jsonshape, test/benchmark/example filenames).src/main.cNaN-return statements across the 14 native-binding members of the namespace.Deliberately excluded from this PR:
ctoris the canonical pure-JS structural outlier in this namespace (nobinding.gyp,src/,lib/native.js, etc.) — intentional.mgf/lib/factory.jssummary wording (of a→for a) — already covered by open PR docs: propagate fixes to sibling packages #12677.var main = require( './main.js' )vs the named-variable form used bymean,median,mode: the named-variable form is the ecosystem-wide convention across siblingstats/base/dists/*/{mean,median,mode}packages, so the local 12/15 majority is the wrong direction.stdevusing Python rather than Julia test fixtures — out of scope (the test file imports the Python fixture, so migrating would require regenerating fixtures and rewriting the test).@returnsJSDoc type variation across summary-statistic kernels — no ≥75% majority; reflects genuine semantic differences (e.g.stdev/variancelegitimately usePositiveNumber).s < 0.0vss <= 0.0validation guards — intentional semantic split between density/quantile kernels (wheres = 0is a defined degenerate case) and summary-statistic kernels (wheres = 0is undefined).PR #12874 (merged 2026-06-15) ran the same routine on this namespace and landed the
mu"mean" → "location parameter" JSDoc normalization; this PR addresses two C-source style items that fell outside that pass.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of the cross-package API drift detection routine. The routine extracted structural and semantic features from every member of
stats/base/dists/logistic/, computed per-feature majority patterns at 75% conformance, and validated each surviving candidate through two parallel review agents before any edit. The corrections in this PR are pure C-source whitespace changes; no behaviour, signatures, generated machine code, or tests changed. A human maintainer should verify the patches before promoting this PR out of draft.@stdlib-js/reviewers
Generated by Claude Code