48 #ifndef VC_COMMON_LOGARITHM_H
49 #define VC_COMMON_LOGARITHM_H
57 #ifdef VC__USE_NAMESPACE
58 using Vc::VC__USE_NAMESPACE::Const;
59 using Vc::VC__USE_NAMESPACE::Vector;
62 using namespace Vc::VC__USE_NAMESPACE::Internal;
69 template<LogarithmBase Base>
95 V
y = (y0 * x9 + y1 * x6) + y2 * x3;
96 #elif defined VC_LOG_ILP2
129 const V
x4 = x2 *
x2;
130 const V x5 = x2 *
x3;
131 const V x6 = x3 *
x3;
132 const V x7 = x4 *
x3;
133 const V x8 = x4 *
x4;
134 const V x9 = x5 *
x4;
135 const V x10 = x5 * x5;
136 const V x11 = x5 * x6;
149 y += exponent * C::ln2_small();
152 x += exponent * C::ln2_large();
155 y += exponent * C::ln2_small();
158 x += exponent * C::ln2_large();
166 y -= x_ * x * C::_1_2();
175 typedef Vector<double> V;
176 typedef Const<double>
C;
182 y2 = y2 * x +
C::Q(i);
191 y += exponent * C::ln2_small();
194 x += exponent * C::ln2_large();
197 y += exponent * C::ln2_small();
200 x += exponent * C::ln2_large();
208 y -= x_ * x * C::_1_2();
218 typedef typename V::Mask M;
223 const M invalidMask = x <
V::Zero();
224 const M infinityMask = x ==
V::Zero();
225 const M denormal = x <=
C::min();
231 x.setZero(C::exponentMask());
240 const M smallX = x < C::_1_sqrt2();
245 log_series(x, exponent);
247 x.setQnan(invalidMask);
248 x(infinityMask) = C::neginf();
264 #ifdef VC__USE_NAMESPACE
271 #undef VC__USE_NAMESPACE
277 #endif // VC_COMMON_LOGARITHM_H
static Vector< T > calc(VC_ALIGNED_PARAMETER(Vector< T >) _x)
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
Namespace for new ROOT classes and functions.
static Vc_ALWAYS_INLINE Vc_CONST Vector< T > log2(VC_ALIGNED_PARAMETER(Vector< T >) x)
static const float log2_e
static const double x2[5]
static Vc_ALWAYS_INLINE Vc_CONST Vector< T > log(VC_ALIGNED_PARAMETER(Vector< T >) x)
static const double x4[22]
#define VC_ALIGNED_PARAMETER(_Type)
#define Vc_buildDouble(sign, mantissa, exponent)
static Vc_ALWAYS_INLINE Vc_CONST Vector< T > log10(VC_ALIGNED_PARAMETER(Vector< T >) x)
static Vc_ALWAYS_INLINE void log_series(Vector< T > &VC_RESTRICT x, typename Vector< T >::AsArg exponent)
MyComplex< T > P(MyComplex< T > z, T c_real, T c_imag)
[MyComplex]
Vc_INTRINSIC Vc_CONST m256 exponent(param256 v)
#define unrolled_loop16(_it_, _start_, _end_, _code_)
#define VC__USE_NAMESPACE
static Vc_ALWAYS_INLINE void log_series(Vector< double > &VC_RESTRICT x, Vector< double >::AsArg exponent)
static const double x3[11]