docs: fix stale factory example return values in @stdlib/stats/base/dists/lognormal/logpdf - #14704
Draft
Planeshifter wants to merge 1 commit into
Draft
docs: fix stale factory example return values in @stdlib/stats/base/dists/lognormal/logpdf#14704Planeshifter wants to merge 1 commit into
@stdlib/stats/base/dists/lognormal/logpdf#14704Planeshifter wants to merge 1 commit into
Conversation
…gnormal/logpdf` The `@module` example in `lib/index.js` documented `logpdf.factory( 4.0, 2.0 )` returning ~-4.269 at x=10 and ~-3.689 at x=2. The actual values are ~-4.275 and ~-3.672. The correct values are already carried by every other representation of the same example: `lib/factory.js`, `README.md`, and `docs/repl.txt` (3/3 in-package copies agreed against the lone stale `lib/index.js`). The corrected values also restore the cross-package invariant that a member's `lib/index.js` factory example matches its `lib/factory.js` output, which holds for the other four factory-bearing members of the namespace (`cdf`, `pdf`, `quantile`, `logcdf`). Comment-only change; no observable behavior or test expectations are affected.
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 corrects two stale return values in the
@moduledocumentation example of@stdlib/stats/base/dists/lognormal/logpdf.logpdf.factory( 4.0, 2.0 )evaluates to~-4.275atx = 10and~-3.672atx = 2.lib/index.jsdocumented~-4.269and~-3.689. The correct values are already present in the package's ownlib/factory.js,README.md, anddocs/repl.txt, solib/index.jswas the lone stale copy. The fix also restores the cross-package invariant that a member'slib/index.jsfactory example matches itslib/factory.jsoutput, which holds for the namespace's four other factory-bearing members (cdf,pdf,quantile,logcdf): conformance goes from 4/5 (80%) to 5/5 (100%). Comment-only change; no observable behavior or test expectations are affected.Related Issues
No.
Questions
No.
Other
The discrepancy was found via a cross-package documentation-consistency check across the
stats/base/dists/lognormalnamespace. The corrected values were recomputed directly (node -e "require('.../logpdf/lib/factory.js')(4,2)(10)"→-4.2748…,(2)→-3.6721…). No other drift in the namespace survived filtering; all remaining deviations (e.g.ctorlacking C bindings,logcdfsupporting the degeneratesigma = 0case) are intentional and were deliberately excluded.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running an automated cross-package documentation-consistency check. The stale values were identified by comparing the
@moduleexample inlib/index.jsagainst the package'slib/factory.js,README.md, anddocs/repl.txt, and the corrected values were verified by recomputing the factory output with Node.js.@stdlib-js/reviewers
Generated by Claude Code