From f6b4e8115d87128f5c69975a8fbfe70834a596c8 Mon Sep 17 00:00:00 2001 From: Pranavchiku Date: Sat, 17 Dec 2022 10:06:53 +0530 Subject: [PATCH 01/15] add c-api documentation in readme.md --- .../math/base/special/erfinv/README.md | 91 ++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/erfinv/README.md b/lib/node_modules/@stdlib/math/base/special/erfinv/README.md index 2b3c8d74824a..c41b66b473c4 100644 --- a/lib/node_modules/@stdlib/math/base/special/erfinv/README.md +++ b/lib/node_modules/@stdlib/math/base/special/erfinv/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2022 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -123,6 +123,95 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/erfinv.h" +``` + +#### stdlib_base_erfinv( x ) + +Evaluates the [inverse error function][inverse-error-function]. + +```c +double out = stdlib_base_erfinv( 0.5 ); +// returns ~0.4769 + +out = stdlib_base_erfinv( 0.8 ); +// returns ~0.9062 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_erfinv( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/erfinv.h" +#include +#include + +int main() { + double x[] = { -1.0, -0.78, -0.56, -0.33, -0.11, 0.11, 0.33, 0.56, 0.78, 1.0 }; + double v; + int i; + + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_erfinv( x[ i ] ); + printf( "x: %lf, erfinv(x): %lf\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + +