diff --git a/lib/node_modules/@stdlib/stats/base/dists/gumbel/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/gumbel/cdf/README.md index 3473f5d3eb94..e7fa9f4196b3 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/gumbel/cdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/gumbel/cdf/README.md @@ -138,6 +138,104 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/gumbel/cdf.h" +``` + +#### stdlib_base_dists_gumbel_cdf( x, mu, beta ) + +Evaluates the [cumulative distribution function][cdf] (CDF) for a [Gumbel][gumbel-distribution] distribution with parameters `mu` (location parameter) and `beta` (scale parameter). + +```c +double out = stdlib_base_dists_gumbel_cdf( 10.0, 0.0, 3.0 ); +// returns ~0.965 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **mu**: `[in] double` location parameter. +- **beta**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_gumbel_cdf( const double x, const double mu, const double beta ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/gumbel/cdf.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 beta; + double mu; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.0, 10.0 ); + mu = random_uniform( 0.0, 10.0 ); + beta = random_uniform( 0.0, 10.0 ); + y = stdlib_base_dists_gumbel_cdf( x, mu, beta ); + printf( "x: %lf, µ: %lf, β: %lf, F(x;µ,β): %lf\n", x, mu, beta, y ); + } +} +``` + +
+ + + +
+ + +