diff --git a/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/logcdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/logcdf/README.md index 9fdca76e6a56..081c6e9af05a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/logcdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/logcdf/README.md @@ -163,6 +163,105 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/pareto-type1/logcdf.h" +``` + +#### stdlib_base_dists_pareto_type1_logcdf( x, alpha, beta ) + +Evaluates the natural logarithm of the cumulative distribution function (CDF) for a Pareto (Type I) distribution with parameters `alpha` (shape parameter) and `beta` (scale parameter). + +```c +double y = stdlib_base_dists_pareto_type1_logcdf( 2.0, 1.0, 1.0 ); +// returns ~-0.693 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **alpha**: `[in] double` shape parameter. +- **beta**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_pareto_type1_logcdf( const double x, const double alpha, const double beta ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/pareto-type1/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 alpha; + double beta; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.0, 8.0 ); + alpha = random_uniform( 0.0, 5.0 ); + beta = random_uniform( 0.0, 5.0 ); + y = stdlib_base_dists_pareto_type1_logcdf( x, alpha, beta ); + printf( "x: %lf, α: %lf, β: %lf, ln(F(x;α,β)): %lf\n", x, alpha, beta, y ); + } +} +``` + +
+ + + +
+ + + +