diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/README.md index cb8b8db1f754..e48ab438460c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/README.md @@ -174,6 +174,104 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/kumaraswamy/logcdf.h" +``` + +#### stdlib_base_dists_kumaraswamy_logcdf( x, a, b ) + +Evaluates the natural logarithm of the cumulative distribution function (CDF) for a Kumaraswamy's double bounded distribution. + +```c +double out = stdlib_base_dists_kumaraswamy_logcdf( 0.5, 1.0, 1.0 ); +// returns ~-0.693 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **a**: `[in] double` first shape parameter. +- **b**: `[in] double` second shape parameter. + +```c +double stdlib_base_dists_kumaraswamy_logcdf( const double x, const +double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/kumaraswamy/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 a; + double b; + double y; + int i; + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0, 1.0 ); + a = random_uniform( 0, 5.0 ); + b = random_uniform( 0, 5.0 ); + y = stdlib_base_dists_kumaraswamy_logcdf( x, a, b ); + printf( "x: %lf, a: %lf, b: %lf, ln(F(x;a,b)): %lf\n", x, a, b, y ); + } +} +``` + +
+ + + +
+ + +