diff --git a/lib/node_modules/@stdlib/stats/base/dists/t/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/t/cdf/README.md index 6dcbf6e5266f..a19c2cb7d53c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/t/cdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/t/cdf/README.md @@ -129,6 +129,101 @@ logEachMap( 'x: %0.4f, v: %0.4f, F(x;v): %0.4f', x, v, cdf ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/t/cdf.h" +``` + +#### stdlib_base_dists_t_cdf( x, v ) + +Evaluates the [cumulative distribution function][cdf] (CDF) for a [Student's t][t-distribution] distribution with degrees of freedom `v`. + +```c +double y = stdlib_base_dists_t_cdf( 2.0, 0.1 ); +// returns ~0.611 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **v**: `[in] double` degrees of freedom. + +```c +double stdlib_base_dists_t_cdf( const double x, const double v ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/t/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 v; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( -3.0, 3.0 ); + v = random_uniform( 0.0, 10.0 ); + y = stdlib_base_dists_t_cdf( x, v ); + printf( "x: %lf, v: %lf, F(x;v): %lf\n", x, v, y ); + } +} +``` + +
+ + + +
+ + +