From 9cdfef148012eacee47b26b41784ff1909ba6cd8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 11 May 2026 04:24:22 +0000 Subject: [PATCH] docs: add negative-scale `@example` to `stats/base/dists/lognormal/cdf` Adds the `// Negative scale parameter:` `@example` block to the JSDoc in `lib/main.js` and the `interface CDF` main signature JSDoc in `docs/types/index.d.ts`. The block documents `cdf( 2.0, 0.0, -1.0 )` returning `NaN`, which the `sigma <= 0.0` validation guard already enforces and which the package README and `docs/repl.txt` already document. The block is present in 4/5 sibling lognormal `(x, mu, sigma)` packages (`pdf`, `logpdf`, `logcdf`, `quantile`); `cdf` was the lone outlier at 80% sibling conformance. --- .../stats/base/dists/lognormal/cdf/docs/types/index.d.ts | 5 +++++ .../@stdlib/stats/base/dists/lognormal/cdf/lib/main.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/docs/types/index.d.ts index fb42d418ff60..926ccd83271e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/docs/types/index.d.ts @@ -61,6 +61,11 @@ interface CDF { * @example * var y = cdf( NaN, 0.0, 1.0 ); * // returns NaN + * + * @example + * // Negative scale parameter: + * var y = cdf( 2.0, 0.0, -1.0 ); + * // returns NaN */ ( x: number, mu: number, sigma: number ): number; diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/lib/main.js index 250829c88366..37506019a689 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/lib/main.js @@ -54,6 +54,11 @@ var ln = require( '@stdlib/math/base/special/ln' ); * @example * var y = cdf( NaN, 0.0, 1.0 ); * // returns NaN +* +* @example +* // Negative scale parameter: +* var y = cdf( 2.0, 0.0, -1.0 ); +* // returns NaN */ function cdf( x, mu, sigma ) { if (