![]() |
imate
C++/CUDA Reference
|

Go to the source code of this file.
Functions | |
| double | _sign (const double x) |
| sign function. | |
| double | erf_inv (const double x) |
| Inverse error function. | |
| double _sign | ( | const double | x | ) |
sign function.
Definition at line 35 of file special_functions.cpp.
Referenced by erf_inv().

| double erf_inv | ( | const double | x | ) |
Inverse error function.
The function inverse is found based on Newton method using the evaluation of the error function erf from standard math library and its derivative. The Newton method here uses two refinements.
For further details on the algorithm, refer to: http://www.mimirgames.com/articles/programming/approximations- of-the-inverse-error-function/
The accuracy of this method for the whole input interval of [-1, 1] is in the order of 1e-15 compared to scipy.special.erfinv function.
| [in] | x | Input value, a float number between -1 to 1. |
Definition at line 65 of file special_functions.cpp.
References _sign(), and c_arithmetics::is_equal().
Referenced by ConvergenceTools< DataType >::average_estimates(), and ConvergenceTools< DataType >::check_convergence().

