1 /* Boost interval/detail/c99_rounding_control.hpp file
3 * Copyright 2000 Jens Maurer
4 * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
6 * Distributed under the Boost Software License, Version 1.0.
7 * (See accompanying file LICENSE_1_0.txt or
8 * copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
12 #define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
14 #include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
18 namespace interval_lib {
21 struct rounding_control<float>:
22 detail::c99_rounding_control
24 static float force_rounding(float const &r)
25 { volatile float r_ = r; return r_; }
29 struct rounding_control<double>:
30 detail::c99_rounding_control
32 static double force_rounding(double const &r)
33 { volatile double r_ = r; return r_; }
37 struct rounding_control<long double>:
38 detail::c99_rounding_control
40 static long double force_rounding(long double const &r)
41 { volatile long double r_ = r; return r_; }
44 } // namespace interval_lib
45 } // namespace numeric
48 #undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
50 #endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP