// bit layout, but about floating-point NaN (etc.) bit patterns.
#if defined(__sparc) || defined(__sparc__) || defined(__powerpc__) || defined(__ppc__) || defined(__hppa) || defined(_MIPSEB)
#define BOOST_BIG_ENDIAN
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__alpha__)
#define BOOST_LITTLE_ENDIAN
#else
#error The file boost/detail/limits.hpp needs to be set up for your CPU type.
_Int __imin,
_Int __imax,
int __idigits = -1>
-class _Integer_limits : public _Numeric_limits_base<_Int>
+class _Integer_limits : public _Numeric_limits_base<_Int>
{
public:
BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true);
BOOST_STL_DECLARE_LIMITS_MEMBER(int,
digits,
(__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT)
- - (__imin == 0 ? 0 : 1)
+ - (__imin == 0 ? 0 : 1)
: __idigits);
- BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000);
+ BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000);
// log 2 = 0.301029995664...
BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, __imin != 0);
// sizeof(long double) == 16
const unsigned int _S_word[4] = { Word, 0, 0, 0 };
return *reinterpret_cast<const Number*>(&_S_word);
- }
+ }
};
#else
return *reinterpret_cast<const Number*>(
reinterpret_cast<const char *>(&_S_word)+16-
(sizeof(Number) == 12 ? 10 : sizeof(Number)));
- }
+ }
};
#endif
denorm_indeterminate);
BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false);
-
+
static __number infinity() throw() {
return float_helper<__number, __InfinityWord>::get_word();
}
// The unspecialized class.
-template<class T>
+template<class T>
class numeric_limits : public _Numeric_limits_base<T> {};
// Specializations for all built-in integral types.
#if !defined(LONGLONG_MIN)
# define LONGLONG_MIN (-LONGLONG_MAX - 1)
-#endif
+#endif
template<>
class numeric_limits<long long>
// Specializations for all built-in floating-point type.
template<> class numeric_limits<float>
- : public _Floating_limits<float,
+ : public _Floating_limits<float,
FLT_MANT_DIG, // Binary digits of precision
FLT_DIG, // Decimal digits of precision
FLT_MIN_EXP, // Minimum exponent
};
template<> class numeric_limits<double>
- : public _Floating_limits<double,
+ : public _Floating_limits<double,
DBL_MANT_DIG, // Binary digits of precision
DBL_DIG, // Decimal digits of precision
DBL_MIN_EXP, // Minimum exponent
};
template<> class numeric_limits<long double>
- : public _Floating_limits<long double,
+ : public _Floating_limits<long double,
LDBL_MANT_DIG, // Binary digits of precision
LDBL_DIG, // Decimal digits of precision
LDBL_MIN_EXP, // Minimum exponent
// Local Variables:
// mode:C++
// End:
-
-
-