Skip to content

Commit 9cdfef1

Browse files
committed
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.
1 parent 8ef0632 commit 9cdfef1

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf

lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/docs/types/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ interface CDF {
6161
* @example
6262
* var y = cdf( NaN, 0.0, 1.0 );
6363
* // returns NaN
64+
*
65+
* @example
66+
* // Negative scale parameter:
67+
* var y = cdf( 2.0, 0.0, -1.0 );
68+
* // returns NaN
6469
*/
6570
( x: number, mu: number, sigma: number ): number;
6671

lib/node_modules/@stdlib/stats/base/dists/lognormal/cdf/lib/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ var ln = require( '@stdlib/math/base/special/ln' );
5454
* @example
5555
* var y = cdf( NaN, 0.0, 1.0 );
5656
* // returns NaN
57+
*
58+
* @example
59+
* // Negative scale parameter:
60+
* var y = cdf( 2.0, 0.0, -1.0 );
61+
* // returns NaN
5762
*/
5863
function cdf( x, mu, sigma ) {
5964
if (

0 commit comments

Comments
 (0)