42 #if !defined(Intrepid_MiniTensor_Utilities_i_h)
43 #define Intrepid_MiniTensor_Utilities_i_h
58 return (T(0) < s) - (s < T(0));
67 copysign(T
const & a, T
const & b)
69 return b >= 0 ? std::abs(a) : -std::abs(a);
80 typename Sacado::ScalarType<T>::type
84 std::numeric_limits<typename Sacado::ScalarType<T>::type>::quiet_NaN();
95 typename Sacado::ScalarType<T>::type
99 std::numeric_limits<typename Sacado::ScalarType<T>::type>::epsilon();
107 integer_power(T
const & X, Index
const exponent)
136 number_digits = std::numeric_limits<Index>::digits;
139 leftmost_bit = rightmost_bit << (number_digits - 1);
144 for (Index j = 0; j < number_digits; ++j) {
146 if (((exponent << j) & leftmost_bit) != 0) {
148 t = number_digits - j - 1;
164 while ((m & rightmost_bit) == 0) {
173 for (Index j = i + 1; j <= t; ++j) {
176 if (((exponent >> j) & rightmost_bit) != 0) {
186 #endif // Intrepid_MiniTensor_Utilities_i_h