diff --git a/lib/node_modules/@stdlib/stats/base/dists/t/logcdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/t/logcdf/README.md index f4fb722dc739..8024cf2dd081 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/t/logcdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/t/logcdf/README.md @@ -139,6 +139,101 @@ logEachMap( 'x: %0.4f, v: %0.4f, ln(F(x;v)): %0.4f', x, v, logcdf ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/t/logcdf.h" +``` + +#### stdlib_base_dists_t_logcdf( x, v ) + +Evaluates the natural logarithm of 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_logcdf( 2.0, 0.1 ); +// returns ~-0.493 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **v**: `[in] double` degrees of freedom. + +```c +double stdlib_base_dists_t_logcdf( const double x, const double v ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/t/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 v; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( -3.0, 3.0 ); + v = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_t_logcdf( x, v ); + printf( "x: %lf, v: %lf, ln(F(x;v)): %lf\n", x, v, y ); + } +} +``` + +
+ + + +
+ + +