diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/README.md index 47786ff8550..13bf5ec2d9b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/README.md @@ -137,6 +137,104 @@ for ( i = 0; i < 25; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/arcsine/cdf.h" +``` + +#### stdlib_base_dists_arcsine_cdf( x, a, b ) + +Evaluates the cumulative distribution function (CDF) for an arcsine distribution. + +```c +double out = stdlib_base_dists_arcsine_cdf( 0.5, 0.0, 2.0 ); +// returns ~0.333 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **a**: `[in] double` minimum support. +- **b**: `[in] double` maximum support. + +```c +double stdlib_base_dists_arcsine_cdf( const double x, const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/arcsine/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 a; + double b; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( -10.0, 10.0 ); + a = random_uniform( -20.0, 0.0 ); + b = random_uniform( a, a+40.0 ); + y = stdlib_base_dists_arcsine_cdf( x, a, b ); + printf( "x: %lf, a: %lf, b: %lf, F(x;a,b): %lf\n", x, a, b, y ); + } +} +``` + +
+ + + +
+ + +