Atanherf¶
-
namespace
AtanhErf
¶ Functions
-
spline
getinp
()¶ Load spline data points from file.
The filename is hard coded into the function body and it must be placed in
$PWD/data/atanherf_interp.max_16.step_0.0001.first_1.dat
.The variable PWD is defined at compile time and its value is set by the CMake file. If you want to use a file in a different location, please re-build the library setting the variable
-DPWD='new/path/location'
- Return
- Spline object with the interpolated coordinates.
-
double
atanherf_largex
(const double &x)¶ Atanh of erf function for large values of x.
- Return
- Approximated result of atanherf function.
- Parameters
x
: Input variable.
-
double
atanherf_interp
(const double &x)¶ Atanh of erf function computed with the interpolation coordinates extracted by the spline.
- Return
- Approximated result of atanherf function estimated using a pre-computed LUT. The LUT is generated using a cubic spline interpolation.
- Parameters
x
: Input variable.
-
double
evalpoly
(const double &x)¶ Atanh of erf function evaluated as polynomial decomposition.
- Return
- Approximated result of atanherf function.
- Parameters
x
: Value as argument of atanherf function.
-
double
atanherf
(const double &x)¶ Atanh of erf function.
The result is evaluated with different numerical techniques according to its domain.
In particular:
- if its abs is lower than 2 -> “standard” formula
- if its abs is lower than 15 ->
atanherf_interp
formula - if its abs is greater than 15 ->
atanherf_largex
formula
- Return
- Approximated result of atanherf function.
- Note
- The function automatically use the most appropriated approximation of the atanherf function to prevent possible overflows.
- Parameters
x
: Input variable.
-
spline