/usr/include/boost/numeric/interval
NameSizeModeActions
compare/-0755rm
detail/-0755rm
ext/-0755rm
arith.hpp103530644editdlrm
arith2.hpp100920644editdlrm
arith3.hpp21500644editdlrm
checking.hpp28240644editdlrm
compare.hpp7050644editdlrm
constants.hpp31770644editdlrm
hw_rounding.hpp24410644editdlrm
interval.hpp121980644editdlrm
io.hpp11740644editdlrm
limits.hpp17470644editdlrm
policies.hpp17710644editdlrm
rounded_arith.hpp47830644editdlrm
rounded_transc.hpp52690644editdlrm
rounding.hpp25950644editdlrm
transc.hpp79170644editdlrm
utility.hpp107410644editdlrm
utility_fwd.hpp45890644editdlrm
Edit: /usr/include/boost/numeric/interval/arith3.hpp (2150B)
/* Boost interval/arith3.hpp template implementation file * * This headers provides arithmetical functions * which compute an interval given some base * numbers. The resulting interval encloses the * real result of the arithmetic operation. * * Copyright 2003 Guillaume Melquiond * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_NUMERIC_INTERVAL_ARITH3_HPP #define BOOST_NUMERIC_INTERVAL_ARITH3_HPP #include #include namespace boost { namespace numeric { namespace interval_lib { template inline I add(const typename I::base_type& x, const typename I::base_type& y) { typedef typename I::traits_type Policies; if (detail::test_input(x, y)) return I::empty(); typename Policies::rounding rnd; return I(rnd.add_down(x, y), rnd.add_up(x, y), true); } template inline I sub(const typename I::base_type& x, const typename I::base_type& y) { typedef typename I::traits_type Policies; if (detail::test_input(x, y)) return I::empty(); typename Policies::rounding rnd; return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true); } template inline I mul(const typename I::base_type& x, const typename I::base_type& y) { typedef typename I::traits_type Policies; if (detail::test_input(x, y)) return I::empty(); typename Policies::rounding rnd; return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true); } template inline I div(const typename I::base_type& x, const typename I::base_type& y) { typedef typename I::traits_type Policies; if (detail::test_input(x, y) || user::is_zero(y)) return I::empty(); typename Policies::rounding rnd; return I(rnd.div_down(x, y), rnd.div_up(x, y), true); } } // namespace interval_lib } // namespace numeric } // namespace boost #endif // BOOST_NUMERIC_INTERVAL_ARITH3_HPP