diff --git a/lib/node_modules/@stdlib/stats/base/dists/cauchy/quantile/README.md b/lib/node_modules/@stdlib/stats/base/dists/cauchy/quantile/README.md index 44de22c8b69a..4126fc1e7d3b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/cauchy/quantile/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/cauchy/quantile/README.md @@ -149,6 +149,104 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/cauchy/quantile.h" +``` + +#### stdlib_base_dists_cauchy_cdf( p, x0, gamma ) + +Evaluates the quantile function for a Cauchy distribution with location parameter. + +```c +double out = stdlib_base_dists_cauchy_quantile( 0.3, 2.0, 2.0 ); +// returns ~0.547 +``` + +The function accepts the following arguments: + +- **p**: `[in] double` input value. +- **x0**: `[in] double` location parameter. +- **gamma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_cauchy_quantile( const double p, const double x0, const double gamma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/cauchy/quantile.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 gamma; + double x0; + double p; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + p = random_uniform( 0.0, 1.0 ); + x0 = random_uniform( -5.0, 5.0 ); + gamma = random_uniform( 0.0, 10.0 ); + y = stdlib_base_dists_cauchy_quantile( p, x0, gamma ); + printf( "x: %lf, k: %lf, γ: %lf, Q(x;x0,γ): %lf\n", p, x0, gamma, y ); + } +} +``` + +
+ + + +
+ + +