Skip to content

docs: fix stale factory example return values in @stdlib/stats/base/dists/lognormal/logpdf - #14704

Draft
Planeshifter wants to merge 1 commit into
developfrom
claude/busy-mayer-oa6y2g
Draft

docs: fix stale factory example return values in @stdlib/stats/base/dists/lognormal/logpdf#14704
Planeshifter wants to merge 1 commit into
developfrom
claude/busy-mayer-oa6y2g

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request corrects two stale return values in the @module documentation example of @stdlib/stats/base/dists/lognormal/logpdf.

  • logpdf.factory( 4.0, 2.0 ) evaluates to ~-4.275 at x = 10 and ~-3.672 at x = 2. lib/index.js documented ~-4.269 and ~-3.689. The correct values are already present in the package's own lib/factory.js, README.md, and docs/repl.txt, so lib/index.js was the lone stale copy. The fix also restores the cross-package invariant that a member's lib/index.js factory example matches its lib/factory.js output, 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

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

The discrepancy was found via a cross-package documentation-consistency check across the stats/base/dists/lognormal namespace. 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. ctor lacking C bindings, logcdf supporting the degenerate sigma = 0 case) are intentional and were deliberately excluded.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance.

This PR was authored by Claude Code running an automated cross-package documentation-consistency check. The stale values were identified by comparing the @module example in lib/index.js against the package's lib/factory.js, README.md, and docs/repl.txt, and the corrected values were verified by recomputing the factory output with Node.js.


@stdlib-js/reviewers


Generated by Claude Code

…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.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Aug 27, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/lognormal/logpdf $\\color{green}319/319$
$\\color{green}+100.00\\%$
$\\color{green}23/23$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}319/319$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants