29 static inline bool isnan(
float x) {
return _isnan(x); }
30 static inline bool isnan(
double x) {
return _isnan(x); }
51 return ldexp(
std::abs(ref - val), std::numeric_limits<T>::digits - exp);
61 template<
typename _T>
static Vc::Vector<_T>
ulpDiffToReference(
const Vc::Vector<_T> &_val,
const Vc::Vector<_T> &_ref)
65 typedef typename V::EntryType
T;
66 typedef typename V::Mask M;
74 val (zeroMask)=
abs(val);
78 ref (zeroMask)=
abs(ref);
80 diff (zeroMask)+=
V::One();
84 diff +=
ldexp(
abs(ref - val), std::numeric_limits<T>::digits - exp);
85 diff.setZero(_val == _ref || (
isnan(_val) &&
isnan(_ref)));
Vector< sfloat > sfloat_v
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
VECTOR_NAMESPACE::short_v short_v
double_v frexp(double_v::AsArg v, int_v *e)
splits v into exponent and mantissa, the sign is kept with the mantissa
static T ulpDiffToReferenceSigned(T val, T ref)
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
VECTOR_NAMESPACE::int_v int_v
static T ulpDiffToReference(T val, T ref)
double ldexp(double, int)