diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/quantile/README.md b/lib/node_modules/@stdlib/stats/base/dists/lognormal/quantile/README.md index 0f6598f9c023..aad87614d477 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/quantile/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/quantile/README.md @@ -151,6 +151,101 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/lognormal/quantile.h" +``` + +#### stdlib_base_dists_lognormal_quantile( mu, sigma ) + +Returns the quantile for a lognormal distribution with location `mu` and scale `sigma`. + +```c +double out = stdlib_base_dists_lognormal_quantile( 0.0, 1.0 ); +// returns ~4.671 +``` + +The function accepts the following arguments: + +- **mu**: `[in] double` location parameter. +- **sigma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_lognormal_quantile( const double mu, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/lognormal/quantile.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 sigma; + double mu; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + mu = random_uniform( 0.0, 10.0 ) - 5.0; + sigma = random_uniform( 0.0, 20.0 ); + y = stdlib_base_dists_lognormal_quantile( mu, sigma ); + printf( "µ: %lf, σ: %lf, Var(X;µ,σ): %lf\n", mu, sigma, y ); + } +} +``` + +
+ + + +
+ + +