style: format if conditions in stats/base/dists/rayleigh#12889
Draft
Planeshifter wants to merge 2 commits into
Draft
style: format if conditions in stats/base/dists/rayleigh#12889Planeshifter wants to merge 2 commits into
if conditions in stats/base/dists/rayleigh#12889Planeshifter wants to merge 2 commits into
Conversation
Reformat the `if` predicate in `src/main.c` to the multi-line style used by the majority of sibling C sources in `@stdlib/stats/base/dists/rayleigh` (12 of 14 packages, 85.7% conformance), and replace the integer literal `0` with the floating-point literal `0.0` (13 of 14 packages, 92.8% conformance) to match the convention established by #12204. No behavior change.
Reformat the `if` predicate in `src/main.c` to the multi-line style used by the majority of sibling C sources in `@stdlib/stats/base/dists/rayleigh` (12 of 14 packages, 85.7% conformance). No behavior change.
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 aligns two C source files in
@stdlib/stats/base/dists/rayleighwith the formatting and floating-point-literal conventions used across the rest of the namespace.Namespace summary
ctor, which is a JS-only constructor).ifpredicate format (12/14, 85.7%), floating-point-literal use insigma < 0.0comparisons (13/14, 92.8%),lib/main.jsvalidation predicate (sigma < 0.0, 7/8 sigma-only packages),@param {NonNegativeNumber} sigmaJSDoc type (7/8),package.jsontop-level shape,README.mdsection order,lib/native.js/manifest.json/binding.gyppresence,examples/c/example.cshape,docs/types/index.d.tsshape.README ## Notessection presence (2/6 in factory packages),0.0/0.0vs0.0 / 0.0whitespace in NaN literals (8 vs 6, no majority).Outlier packages
stats/base/dists/rayleigh/medianReformats the
ifpredicate insrc/main.cto the multi-line form used across 12 of 14 sibling distributions and replaces the integer literal0with0.0to match the floating-point convention established in #12204. Both deviations were introduced whenmedianwas added in 2025 and went undetected. Brings the file into conformance with the rest of the package.stats/base/dists/rayleigh/varianceReformats the
ifpredicate insrc/main.cto the multi-line form used by 12 of 14 sibling distributions in the namespace. The single-line guard was the only divergence from the established pattern; no behavioral change.Related Issues
None.
Questions
None.
Other
Validation
package.jsonshape, README sections, manifest shape) were extracted across all 15 members and compared against a 75% majority threshold.lib/main.js,lib/index.js, and anylib/factory.jsin each package.confirmed-driftfor the items in this PR.entropy/lib/main.jsusessigma <= 0.0and@param {PositiveNumber}rather than the sibling patternsigma < 0.0/@param {NonNegativeNumber}. The C source and JS tests are internally consistent; aligning would change observable behavior atsigma === 0, which is out of scope for a drift-correction PR.mgf/lib/factory.jslacks thesigma === 0.0→degenerateshort-circuit present in the other five factory packages. Applying it would changemgf(t, 0)fromSQRT_HALF_PIto1.0. Worth a separate bug-fix PR, but out of scope here.mgflackstest/fixtures/julia/; the closed-form MGF formula does not need empirical comparison fixtures, so absence is intentional.ctorlacks C-binding artifacts entirely (intentional — it is a JS-only constructor).Disclosure
This pull request was produced by an automated cross-package drift-detection routine running under Claude Code. The agent extracted structural and semantic features across all members of the namespace, computed per-feature majorities, validated each candidate correction with three independent reviewer agents, and applied only those corrections that did not change observable behavior. All changes were reviewed before commit.
Checklist
AI Assistance
Yes
No
Code generation (e.g., when writing an implementation or fixing a bug)
Test/benchmark generation
Documentation (including examples)
Research and understanding
Disclosure
This PR was authored end-to-end by an automated drift-detection routine running under Claude Code: feature extraction, three-agent validation, code changes, commit composition, and PR body. A maintainer should review before merging.
Generated by Claude Code