35 #ifndef _BLAZE_MATH_FUNCTIONS_H_ 36 #define _BLAZE_MATH_FUNCTIONS_H_ 65 template<
typename T >
66 inline constexpr
int sign( T a ) noexcept;
68 template<
typename T >
69 inline size_t digits( T a ) noexcept;
71 template<
typename T1,
typename T2 >
74 template<
typename T1,
typename T2 >
76 noexcept( IsBuiltin< CommonType_<T1,T2> >::value );
78 template<
typename T1,
typename T2 >
80 noexcept( IsBuiltin< CommonType_<T1,T2> >::value );
95 template<
typename T >
96 inline constexpr
int sign( T a ) noexcept
101 ?( T(0) < a ) - ( a < T(0) )
125 template<
typename T >
155 template<
typename T1,
typename T2 >
158 return ( value + ( factor - ( value % factor ) ) % factor );
174 template<
typename T >
200 return ( b - a ) > 1E-8F;
222 return ( b - a ) > 1E-8;
244 return ( b - a ) > 1E-10;
262 template<
typename T1,
typename T2 >
266 return less_backend< CommonType_<T1,T2> >( a, b );
282 template<
typename T >
308 return ( b - a ) > 1E-8F;
330 return ( b - a ) > 1E-8;
350 BLAZE_ALWAYS_INLINE constexpr
bool greater_backend(
long double a,
long double b ) noexcept
352 return ( b - a ) > 1E-10;
370 template<
typename T1,
typename T2 >
374 return greater_backend< CommonType_<T1,T2> >( a, b );
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE constexpr bool less(const T1 &a, const T2 &b) noexcept(IsBuiltin< CommonType_< T1, T2 > >::value)
Generic less-than comparison.
Definition: Functions.h:263
constexpr int sign(T a) noexcept
Sign function.
Definition: Functions.h:96
Compile time check for signed data types.This type trait tests whether or not the given template para...
Definition: IsSigned.h:77
BLAZE_ALWAYS_INLINE constexpr bool greater(const T1 &a, const T2 &b) noexcept(IsBuiltin< CommonType_< T1, T2 > >::value)
Generic greater-than comparison.
Definition: Functions.h:371
#define BLAZE_CONSTRAINT_MUST_BE_INTEGRAL_TYPE(T)
Constraint on the data type.In case the given data type T is not an integral data type...
Definition: Integral.h:60
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the IsFloatingPoint type trait.
size_t digits(T a) noexcept
Returns the number of valid digits of an integral value.
Definition: Functions.h:126
Compile time check for floating point data types.This type trait tests whether or not the given templ...
Definition: IsFloatingPoint.h:75
Constraint on the data type.
Header file for the CommonType type trait.
BLAZE_ALWAYS_INLINE constexpr auto nextMultiple(T1 value, T2 factor) noexcept
Rounds up an integral value to the next multiple of a given factor.
Definition: Functions.h:156
Compile time check for built-in data types.This type trait tests whether or not the given template pa...
Definition: IsBuiltin.h:75
Header file for the IsSigned type trait.
#define BLAZE_CONSTRAINT_MUST_BE_BUILTIN_TYPE(T)
Constraint on the data type.In case the given data type T is not a built-in data type, a compilation error is created.
Definition: Builtin.h:60
Header file for the IsBuiltin type trait.
typename CommonType< T... >::Type CommonType_
Auxiliary alias declaration for the CommonType type trait.The CommonType_ alias declaration provides ...
Definition: CommonType.h:95
System settings for the inline keywords.
Constraint on the data type.