diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/README.md index 73435f3100aa..3d04a1bf8c9d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/quantile/README.md @@ -135,6 +135,112 @@ logEachMap( 'p: %0.4f, a: %0.4f, b: %0.4f, Q(p;a,b): %0.4f', p, a, b, quantile ) + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/arcsine/quantile.h" +``` + +#### stdlib_base_dists_arcsine_quantile( p, a, b ) + +Evaluates the quantile function for an arcsine distribution. + +```c +double out = quantile( 0.8, 0.0, 1.0 ); +// returns ~0.905 +``` + +The function accepts the following arguments: + +- **p**: `[in] double` input value. +- **a**: `[in] double` minimum support. +- **b**: `[in] double` maximum support. + +```c +double stdlib_base_dists_arcsine_quantile( const double p, const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/arcsine/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 a; + double b; + double p; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + p = random_uniform( 0.0, 1.0 ); + a = random_uniform( -20.0, 0.0); + b = random_uniform( a, a+40.0 ); + y = stdlib_base_dists_arcsine_quantile( p, a, b ); + printf( "p: %lf, a: %lf, b: %lf, Q(p;a,b): %lf\n", p, a, b, y ); + } +} +``` + +
+ + + +
+ + + + + +
+ +
+ + +