Chris@16: /* Boost interval/limits.hpp template implementation file Chris@16: * Chris@16: * Copyright 2000 Jens Maurer Chris@16: * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion Chris@16: * Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or Chris@16: * copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP Chris@16: #define BOOST_NUMERIC_INTERVAL_LIMITS_HPP Chris@16: Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace std { Chris@16: Chris@16: template Chris@16: class numeric_limits > Chris@16: : public numeric_limits Chris@16: { Chris@16: private: Chris@16: typedef boost::numeric::interval I; Chris@16: typedef numeric_limits bl; Chris@16: public: Chris@16: static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); } Chris@16: static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); } Chris@16: static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); } Chris@16: Chris@16: BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate); Chris@16: BOOST_STATIC_CONSTANT(bool, is_iec559 = false); Chris@16: Chris@16: static I infinity () throw() { return I::whole(); } Chris@16: static I quiet_NaN() throw() { return I::empty(); } Chris@16: static I signaling_NaN() throw() Chris@16: { return I(bl::signaling_NaN(), bl::signaling_Nan()); } Chris@16: static I denorm_min() throw() Chris@16: { return I(bl::denorm_min(), bl::denorm_min()); } Chris@16: private: Chris@16: static I round_error(); // hide this on purpose, not yet implemented Chris@16: }; Chris@16: Chris@16: } // namespace std Chris@16: Chris@16: Chris@16: #endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP