Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-25 09:50:49

0001 /* Boost interval/detail/c99_rounding_control.hpp file
0002  *
0003  * Copyright 2000 Jens Maurer
0004  * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
0005  *
0006  * Distributed under the Boost Software License, Version 1.0.
0007  * (See accompanying file LICENSE_1_0.txt or
0008  * copy at http://www.boost.org/LICENSE_1_0.txt)
0009  */
0010 
0011 #ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
0012 #define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
0013 
0014 #include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
0015 
0016 namespace boost {
0017 namespace numeric {
0018 namespace interval_lib {
0019 
0020 template<>
0021 struct rounding_control<float>:
0022   detail::c99_rounding_control
0023 {
0024   static float force_rounding(float const &r)
0025   { volatile float r_ = r; return r_; }
0026 };
0027 
0028 template<>
0029 struct rounding_control<double>:
0030   detail::c99_rounding_control
0031 {
0032   static double force_rounding(double const &r)
0033   { volatile double r_ = r; return r_; }
0034 };
0035 
0036 template<>
0037 struct rounding_control<long double>:
0038   detail::c99_rounding_control
0039 {
0040   static long double force_rounding(long double const &r)
0041   { volatile long double r_ = r; return r_; }
0042 };
0043 
0044 } // namespace interval_lib
0045 } // namespace numeric
0046 } // namespace boost
0047 
0048 #undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
0049 
0050 #endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP