diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/cdf/README.md index 877f402c385b..210737191319 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/cdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/cdf/README.md @@ -120,6 +120,102 @@ for ( i = 0; i < lambda.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/planck/cdf.h" +``` + +#### stdlib_base_dists_planck_cdf( x, lambda ) + +Evaluates the cumulative distribution function (CDF) for a Planck distribution. + +```c +double out = stdlib_base_dists_planck_cdf( 2.0, 0.5 ); +// returns ~0.7769 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **lambda**: `[in] double` shape parameter. + +```c +double stdlib_base_dists_planck_cdf( const double x, const double lambda ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/planck/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 x; + double lambda; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( -10.0, 10.0 ); + lambda = random_uniform( 0.1, 5.0 ); + y = stdlib_base_dists_planck_cdf( x, lambda ); + printf( "x: %lf, lambda: %lf, F(x; lambda): %lf\n", x, lambda, y ); + } + + return 0; +} +``` + +
+ + + +
+ + +