#include <cstdint>
#include <cmath>
#include <limits>
#include <algorithm>
Go to the source code of this file.
template<int DEGREE>
float approx_expf |
( |
float |
x | ) |
|
|
inline |
template<int DEGREE>
float approx_expf_P |
( |
float |
p | ) |
|
|
inline |
Definition at line 83 of file approx_exp.h.
References detailsBasic3DVector::y.
84 #ifdef HORNER // HORNER
85 return float(0x2.p0) +
y * (float(0x1.fff798p0) +
y * (float(0x1.02249p0) +
y * float(0x5.62042p-4))) ;
87 float p23 = (float(0x1.02249p0) +
y * float(0x5.62042p-4)) ;
88 float p01 = float(0x2.p0) +
y * float(0x1.fff798p0);
Definition at line 94 of file approx_exp.h.
References detailsBasic3DVector::y.
95 return float(0x2.p0) +
y * (float(0x1.fffb1p0) +
y * (float(0xf.ffe84p-4) +
y * (float(0x5.5f9c1p-4) +
y * float(0x1.57755p-4)))) ;
Definition at line 99 of file approx_exp.h.
References detailsBasic3DVector::y.
100 return float(0x2.p0) +
y * (float(0x2.p0) +
y * (float(0xf.ffed8p-4) +
y * (float(0x5.5551cp-4) +
y * (float(0x1.5740d8p-4) +
y * float(0x4.49368p-8))))) ;
Definition at line 104 of file approx_exp.h.
References AlCaHLTBitMon_ParallelJobs::p, and detailsBasic3DVector::y.
105 #ifdef HORNER // HORNER
106 float p = float(0x2.p0) +
y * (float(0x2.p0) +
y * (float(0x1.p0) +
y * (float(0x5.55523p-4) +
y * (float(0x1.5554dcp-4) +
y * (float(0x4.48f41p-8) +
y * float(0xb.6ad4p-12)))))) ;
107 #else // ESTRIN does seem to save a cycle or two
108 float p56 = float(0x4.48f41p-8) +
y * float(0xb.6ad4p-12);
109 float p34 = float(0x5.55523p-4) +
y * float(0x1.5554dcp-4);
111 float p12 = float(0x2.p0) +
y;
112 float p36 = p34 + y2*p56;
113 float p16 = p12 + y2*p36;
114 float p = float(0x2.p0) +
y*p16;
Definition at line 121 of file approx_exp.h.
References detailsBasic3DVector::y.
122 return float(0x2.p0) +
y * (float(0x2.p0) +
y * (float(0x1.p0) +
y * (float(0x5.55555p-4) +
y * (float(0x1.5554e4p-4) +
y * (float(0x4.444adp-8) +
y * (float(0xb.6a8a6p-12) +
y * float(0x1.9ec814p-12))))))) ;
template<int DEGREE>
float unsafe_expf |
( |
float |
x | ) |
|
|
inline |
Definition at line 198 of file approx_exp.h.
References x.
199 return unsafe_expf_impl<DEGREE>(
x);
template<int DEGREE>
float unsafe_expf_impl |
( |
float |
x | ) |
|
|
inline |