docs: fix invalid NaN literal in C examples - #14353
Conversation
Propagates fix from 6e22696 ("chore: clean-up") to sibling distribution packages whose `factory.js` JSDoc omits "natural" before "logarithm" when describing log-PDF/log-CDF evaluation. Each affected package's `main.js` and inner factory docblocks already use "natural logarithm"; this makes the outer factory descriptions consistent.
Propagates fix from 1891207 ("docs: fix default value documentation") to sibling packages whose README C usage examples use a bare `NaN` literal, which is not defined in C in that context. Replaces `NaN` with `0.0/0.0`, matching each README's own full example and sibling package READMEs.
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
left a comment
There was a problem hiding this comment.
I think the insertion of "natural" was a mistake. Instead of updating the various descriptions in other stats packages, we should revert the change which inspired the changes in this PR.
This reverts commit eb43ce577760a02f66e29ceabf5e1c3e30de53d2 per maintainer review: the insertion of "natural" in 6e22696 was itself a mistake and is to be reverted at the source rather than propagated to sibling packages.
stats/base packagesNaN literal in C examples in stats/base/ndarray
|
Reverted the This PR does not revert 6e22696 itself — leaving that to a maintainer, since it also touched Generated by Claude Code |
NaN literal in C examples in stats/base/ndarrayNaN literal in C examples
Description
This pull request:
NaNliteral in README C examples, propagating the correction from 1891207 ("docs: fix default value documentation").Fixes an identical undefined-
NaNusage in the C examples ofdnanmidrangeanddnanmeanwdREADMEs, propagating the correction fromdnanmin(commit 1891207).NaNis not a defined identifier in C without additional includes/macros; replaces both occurrences with0.0/0.0, matching the pattern already used elsewhere in each README's full example and in sibling packages.The PR originally also propagated the "natural logarithm" JSDoc qualifier from 6e22696 across 22
stats/base/distslog-PDF/CDF/PMF factories; per review, that change set was reverted on this branch (net diff no longer touches those files), as the qualifier insertion is to be reverted at its source instead.Related Issues
No.
Questions
No.
Other
Validation: both sites were verified inside fenced C code blocks by two independent validation passes plus a style pass against sibling
dnan*READMEs (dnanmin,dnanmeanpn,dnanmeanors,dnanmean), all of which use0.0/0.0in equivalent snippets. Note: open PR #10203 (C implementation fordnanmidrange) rewrites that README and may need a trivial rebase over the one-line fix.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 an automated fix-propagation routine: it identified generalizable fixes merged to
developin the last 24 hours, searched for sibling packages with the same defects, and applied the equivalent one-line fixes after multi-pass validation.@stdlib-js/reviewers