1 #ifndef DataFormatsMathAPPROX_EXP_H 2 #define DataFormatsMathAPPROX_EXP_H 49 #ifdef HORNER // HORNER 54 return p01 +
y *
y * p23;
73 #ifdef HORNER // HORNER 79 #else // ESTRIN does seem to save a cycle or two 80 float p56 =
float(0x4.48f41p-8) +
y *
float(0xb.6ad4p-12);
84 float p36 = p34 +
y2 * p56;
85 float p16 = p12 +
y2 * p36;
124 template <
int DEGREE>
125 #ifdef CMS_UNDEFINED_SANITIZER 150 float z =
fpfloor((
x * inv_log2f) + 0.5
f);
165 float p = approx_expf_P<DEGREE>(y);
169 uint32_t biased_exponent =
e + 127;
170 ef.ui32 = (biased_exponent << 23);
175 #ifndef NO_APPROX_MATH 177 template <
int DEGREE>
179 return unsafe_expf_impl<DEGREE>(
x);
182 template <
int DEGREE>
191 float r = unsafe_expf<DEGREE>(
x);
197 template <
int DEGREE>
201 template <
int DEGREE>
205 #endif // NO_APPROX_MATH
constexpr float approx_expf_P(float p)
constexpr float fpfloor(float x)
constexpr float approx_expf_P< 5 >(float y)
float __attribute__((vector_size(8))) cms_float32x2_t
constexpr float approx_expf_P< 2 >(float y)
constexpr float approx_expf_P< 6 >(float y)
constexpr float approx_expf(float x)
constexpr float approx_expf_P< 3 >(float y)
constexpr float unsafe_expf(float x)
constexpr float approx_expf_P< 4 >(float y)
constexpr float unsafe_expf_impl(float x)
constexpr float approx_expf_P< 7 >(float y)