28#ifndef _gcem_erf_inv_HPP
29#define _gcem_erf_inv_HPP
38constexpr T
erf_inv_decision(
const T value,
const T p,
const T direc,
const int iter_count)
noexcept;
51 return( order == 1 ? T(-0.000200214257L) :
52 order == 2 ? T( 0.000100950558L) + a*p_term :
53 order == 3 ? T( 0.00134934322L) + a*p_term :
54 order == 4 ? T(-0.003673428440L) + a*p_term :
55 order == 5 ? T( 0.005739507730L) + a*p_term :
56 order == 6 ? T(-0.00762246130L) + a*p_term :
57 order == 7 ? T( 0.009438870470L) + a*p_term :
58 order == 8 ? T( 1.001674060000L) + a*p_term :
59 order == 9 ? T( 2.83297682000L) + a*p_term :
69 return( order == 9 ? \
82 return( order == 1 ? T( 2.81022636e-08L) :
83 order == 2 ? T( 3.43273939e-07L) + a*p_term :
84 order == 3 ? T(-3.5233877e-06L) + a*p_term :
85 order == 4 ? T(-4.39150654e-06L) + a*p_term :
86 order == 5 ? T( 0.00021858087L) + a*p_term :
87 order == 6 ? T(-0.00125372503L) + a*p_term :
88 order == 7 ? T(-0.004177681640L) + a*p_term :
89 order == 8 ? T( 0.24664072700L) + a*p_term :
90 order == 9 ? T( 1.50140941000L) + a*p_term :
100 return( order == 9 ? \
138 return(
erf(value) - p );
147 return( exp( -value*value ) );
156 return( deriv_1*( -T(2)*value ) );
183 return( ratio_val_1 /
max( T(0.8),
min( T(1.2), T(1) - T(0.5)*ratio_val_1*ratio_val_2 ) ) );
189erf_inv_recur(
const T value,
const T p,
const T deriv_1,
const int iter_count)
#define GCEM_ERF_INV_MAX_ITER
Definition: gcem_options.hpp:141
constexpr T erf_inv_initial_val_case_1(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:97
constexpr T erf_inv_recur(const T value, const T p, const T deriv_1, const int iter_count) noexcept
Definition: erf_inv.hpp:189
constexpr T erf_inv_decision(const T value, const T p, const T direc, const int iter_count) noexcept
Definition: erf_inv.hpp:201
constexpr T erf_inv_initial_val_coef_2(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:48
constexpr T erf_inv_deriv_2(const T value, const T deriv_1) noexcept
Definition: erf_inv.hpp:153
constexpr bool is_nan(const T x) noexcept
Definition: is_nan.hpp:39
constexpr T erf_inv_err_val(const T value, const T p) noexcept
Definition: erf_inv.hpp:135
constexpr T erf_inv_halley(const T ratio_val_1, const T ratio_val_2) noexcept
Definition: erf_inv.hpp:180
constexpr T erf_inv_recur_begin(const T initial_val, const T p) noexcept
Definition: erf_inv.hpp:214
constexpr T erf_inv_initial_val_case_2(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:66
constexpr T erf_inv_ratio_val_1(const T value, const T p, const T deriv_1) noexcept
Definition: erf_inv.hpp:162
constexpr T erf_inv_initial_val_coef_1(const T a, const T p_term, const int order) noexcept
Definition: erf_inv.hpp:79
constexpr T erf_inv_deriv_1(const T value) noexcept
Definition: erf_inv.hpp:144
constexpr T erf_inv_initial_val(const T x) noexcept
Definition: erf_inv.hpp:123
constexpr T erf_inv_ratio_val_2(const T value, const T deriv_1) noexcept
Definition: erf_inv.hpp:171
constexpr T erf_inv_initial_val_int(const T a) noexcept
Definition: erf_inv.hpp:110
constexpr T erf_inv_begin(const T p) noexcept
Definition: erf_inv.hpp:223
Definition: is_even.hpp:29
constexpr T abs(const T x) noexcept
Compile-time absolute value function.
Definition: abs.hpp:40
constexpr return_t< T > erf_inv(const T p) noexcept
Compile-time inverse Gaussian error function.
Definition: erf_inv.hpp:260
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:41
constexpr return_t< T > erf(const T x) noexcept
Compile-time Gaussian error function.
Definition: erf.hpp:143
constexpr return_t< T > log(const T x) noexcept
Compile-time natural logarithm function.
Definition: log.hpp:186
constexpr return_t< T > sqrt(const T x) noexcept
Compile-time square-root function.
Definition: sqrt.hpp:109
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:41
std::numeric_limits< T > GCLIM
Definition: gcem_options.hpp:74
typename std::conditional< std::is_integral< T >::value, double, T >::type return_t
Definition: gcem_options.hpp:77