diff --git a/lib/node_modules/@stdlib/math/base/special/ln/manifest.json b/lib/node_modules/@stdlib/math/base/special/ln/manifest.json index dcc9a2c1a87c..16ef2f9bf56f 100644 --- a/lib/node_modules/@stdlib/math/base/special/ln/manifest.json +++ b/lib/node_modules/@stdlib/math/base/special/ln/manifest.json @@ -38,12 +38,9 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/math/base/napi/unary", - "@stdlib/number/float64/base/get-high-word", - "@stdlib/number/float64/base/set-high-word", - "@stdlib/math/base/assert/is-nan", - "@stdlib/constants/float64/ninf", - "@stdlib/constants/float64/exponent-bias" + "@stdlib/stats/base/dists/normal/logcdf", + "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/ninf" ] }, { @@ -58,11 +55,10 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/number/float64/base/get-high-word", - "@stdlib/number/float64/base/set-high-word", - "@stdlib/math/base/assert/is-nan", - "@stdlib/constants/float64/ninf", - "@stdlib/constants/float64/exponent-bias" + "@stdlib/math/base/napi/binary", + "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/eps", + "@stdlib/constants/float64/ninf" ] }, { @@ -77,32 +73,10 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/number/float64/base/get-high-word", - "@stdlib/number/float64/base/set-high-word", - "@stdlib/math/base/assert/is-nan", - "@stdlib/constants/float64/ninf", - "@stdlib/constants/float64/exponent-bias" - ] - }, - { - "task": "build", - "wasm": true, - "src": [ - "./src/main.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/number/float64/base/get-high-word", - "@stdlib/number/float64/base/set-high-word", - "@stdlib/math/base/assert/is-nan", - "@stdlib/constants/float64/ninf", - "@stdlib/constants/float64/exponent-bias" + "@stdlib/stats/base/dists/normal/logcdf", + "@stdlib/math/base/special/ln", + "@stdlib/constants/float64/ninf" ] } ] } - diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md index 15178fbfeda8..6ac5688fd238 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md @@ -128,6 +128,95 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/lognormal/logcdf.h" +``` + +#### stdlib_base_dists_lognormal_logcdf( x, mu, sigma ) + +Returns the logcdf for a lognormal distribution with mean `mu` and standard deviation `sigma`. + +```c +double out = stdlib_base_dists_lognormal_logcdf( 2.0, 0.0, 1.0 ); +// returns ~-0.2799 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value +- **mu**: `[in] double` mean. +- **sigma**: `[in] double` standard deviation. + +```c +double stdlib_base_dists_lognormal_logcdf( const double x, const double mu, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/lognormal/logcdf.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double x; + double sigma; + double mu; + double y; + int i; + for ( i = 0; i < 25; i++ ) { + x = random_uniform ( 0.0, 20.0 ) - 10.0; + mu = random_uniform( 0.0, 10.0 ) - 5.0; + sigma = random_uniform( 0.0, 20.0 ); + y = stdlib_base_dists_lognormal_logcdf( x, mu, sigma ); + printf( "x: %lf µ: %lf, σ: %lf, Var(X;µ,σ): %lf\n", x, mu, sigma, y ); + } +} +``` +