Ticket #6807: rounded_arith.diff
File rounded_arith.diff, 1.2 KB (added by , 11 years ago) |
---|
-
boost/numeric/interval/rounded_arith.hpp
old new 68 68 { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); } 69 69 T sqrt_up (const T& x) 70 70 { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); } 71 T int_down(const T& x) { this->downward(); return to_int(x); }72 T int_up (const T& x) { this->upward(); return to_int(x); }71 T int_down(const T& x) { this->downward(); return Rounding::to_int(x); } 72 T int_up (const T& x) { this->upward(); return Rounding::to_int(x); } 73 73 # undef BOOST_DN 74 74 # undef BOOST_NR 75 75 # undef BOOST_UP … … 105 105 { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); } 106 106 T sqrt_up (const T& x) 107 107 { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); } 108 T int_down(const T& x) { return - to_int(-x); }109 T int_up (const T& x) { return to_int(x); }108 T int_down(const T& x) { return -Rounding::to_int(-x); } 109 T int_up (const T& x) { return Rounding::to_int(x); } 110 110 # undef BOOST_DN 111 111 # undef BOOST_NR 112 112 # undef BOOST_UP