28#ifndef _gcem_erf_inv_HPP
29#define _gcem_erf_inv_HPP
48 return( order == 1 ? T(-0.000200214257L) :
49 order == 2 ? T( 0.000100950558L) + a*p_term :
50 order == 3 ? T( 0.00134934322L) + a*p_term :
51 order == 4 ? T(-0.003673428440L) + a*p_term :
52 order == 5 ? T( 0.005739507730L) + a*p_term :
53 order == 6 ? T(-0.00762246130L) + a*p_term :
54 order == 7 ? T( 0.009438870470L) + a*p_term :
55 order == 8 ? T( 1.001674060000L) + a*p_term :
56 order == 9 ? T( 2.83297682000L) + a*p_term :
66 return( order == 9 ? \
79 return( order == 1 ? T( 2.81022636e-08L) :
80 order == 2 ? T( 3.43273939e-07L) + a*p_term :
81 order == 3 ? T(-3.5233877e-06L) + a*p_term :
82 order == 4 ? T(-4.39150654e-06L) + a*p_term :
83 order == 5 ? T( 0.00021858087L) + a*p_term :
84 order == 6 ? T(-0.00125372503L) + a*p_term :
85 order == 7 ? T(-0.004177681640L) + a*p_term :
86 order == 8 ? T( 0.24664072700L) + a*p_term :
87 order == 9 ? T( 1.50140941000L) + a*p_term :
97 return( order == 9 ? \
153 return( deriv_1*( -T(2)*
value ) );
180 return( ratio_val_1 /
max( T(0.8),
min( T(1.2), T(1) - T(0.5)*ratio_val_1*ratio_val_2 ) ) );
225 GCLIM<T>::quiet_NaN() :
228 GCLIM<T>::quiet_NaN() :
231 GCLIM<T>::infinity() :
234 - GCLIM<T>::infinity() :
EIGEN_DEVICE_FUNC const ErfReturnType erf() const
\cpp11
Definition: ArrayCwiseUnaryOps.h:655
constexpr return_t< T > erf_inv(const T p) noexcept
Compile-time inverse Gaussian error function.
Definition: erf_inv.hpp:257
#define GCEM_ERF_INV_MAX_ITER
Definition: gcem_options.hpp:141
UnitType abs(const UnitType x) noexcept
Compute absolute value.
Definition: math.h:721
auto sqrt(const UnitType &value) noexcept -> unit_t< square_root< typename units::traits::unit_t_traits< UnitType >::unit_type >, typename units::traits::unit_t_traits< UnitType >::underlying_type, linear_scale >
computes the square root of value
Definition: math.h:483
dimensionless::scalar_t log(const ScalarUnit x) noexcept
Compute natural logarithm.
Definition: math.h:349
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:35
Definition: Eigen_Colamd.h:50
constexpr T erf_inv_err_val(const T value, const T p) noexcept
Definition: erf_inv.hpp:132
constexpr T erf_inv_initial_val_case_2(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:63
constexpr T erf_inv_ratio_val_1(const T value, const T p, const T deriv_1) noexcept
Definition: erf_inv.hpp:159
constexpr T erf_inv_ratio_val_2(const T value, const T deriv_1) noexcept
Definition: erf_inv.hpp:168
constexpr bool is_nan(const T x) noexcept
Definition: is_nan.hpp:36
constexpr T erf_inv_initial_val_case_1(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:94
constexpr T erf_inv_decision(const T value, const T p, const T direc, const int iter_count) noexcept
Definition: erf_inv.hpp:198
constexpr T erf_inv_recur(const T value, const T p, const T deriv_1, const int iter_count) noexcept
Definition: erf_inv.hpp:186
constexpr T erf_inv_recur_begin(const T initial_val, const T p) noexcept
Definition: erf_inv.hpp:211
constexpr T erf_inv_initial_val_coef_2(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:45
constexpr T erf_inv_begin(const T p) noexcept
Definition: erf_inv.hpp:220
constexpr T erf_inv_deriv_1(const T value) noexcept
Definition: erf_inv.hpp:141
constexpr T erf_inv_initial_val_int(const T a) noexcept
Definition: erf_inv.hpp:107
constexpr T erf_inv_initial_val(const T x) noexcept
Definition: erf_inv.hpp:120
constexpr T erf_inv_halley(const T ratio_val_1, const T ratio_val_2) noexcept
Definition: erf_inv.hpp:177
constexpr T erf_inv_initial_val_coef_1(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:76
constexpr T erf_inv_deriv_2(const T value, const T deriv_1) noexcept
Definition: erf_inv.hpp:150