erfinv
Inverse error function. The input parameter is a real number.
Interface Definition
C interface:
float erfinvf(float x);
double erfinv(double x);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
|
Floating-point value of the input data. |
Input |
Return Value
- The inverse error function computing result y of the input parameter x is returned. y ∈ [–inf, +inf]
- If the input is NaN, the return value is NaN.
- If the input is +∞, the return value is NaN.
- If the input is –∞, the return value is NaN.
- If the input is 1, the return value is +inf.
- If the input is –1, the return value is –inf.
- If the input x is greater than 1, the return value is NaN.
- If the input x is smaller than –1, the return value is NaN.
Dependency
C: "km.h"
Example
C interface:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | // print result printf("erfinv(0.0) = %.15f\n",erfinv(0.0)); printf("erfinv(-0.0) = %.15f\n",erfinv(-0.0)); printf("erfinv(0.25) = %.15f\n",erfinv(0.25)); printf("erfinv(-0.25) = %.15f\n",erfinv(-0.25)); printf("erfinv(0.5) = %.15f\n",erfinv(0.5)); printf("erfinv(-0.5) = %.15f\n",erfinv(-0.5)); printf("erfinv(1.0) = %.15f\n",erfinv(1.0)); printf("erfinv(-1.0) = %.15f\n",erfinv(-1.0)); printf("erfinv(2.0) = %.15f\n",erfinv(2.0)); printf("erfinv(-2.0) = %.15f\n",erfinv(-2.0)); printf("erfinv(INFINITY) = %.15f\n",erfinv(INFINITY)); printf("erfinv(-INFINITY) = %.15f\n",erfinv(-INFINITY)); printf("erfinv(NAN) = %.15f\n",erfinv(NAN)); printf("erfinv(-NAN) = %.15f\n",erfinv(-NAN)); /* * erfinv(0.0) = 0.000000000000000 * erfinv(-0.0) = -0.000000000000000 * erfinv(0.25) = 0.225312055012178 * erfinv(-0.25) = -0.225312055012178 * erfinv(0.5) = 0.476936276204470 * erfinv(-0.5) = -0.476936276204470 * erfinv(1.0) = inf * erfinv(-1.0) = -inf * erfinv(2.0) = nan * erfinv(-2.0) = nan * erfinv(INFINITY) = nan * erfinv(-INFINITY) = nan * erfinv(NAN) = nan * erfinv(-NAN) = -nan * * */ |
Parent topic: Special Functions