| 53 | } |
| 54 | |
| 55 | template<class I> inline |
| 56 | I div(const typename I::base_type& x, const typename I::base_type& y) |
| 57 | { |
| 58 | typedef typename I::traits_type Policies; |
| 59 | if (detail::test_input<typename I::base_type, Policies>(x, y) || user::is_zero(y)) |
| 60 | return I::empty(); |
| 61 | typename Policies::rounding rnd; |
| 62 | return I(rnd.div_down(x, y), rnd.div_up(x, y), true); |
| 63 | } |
| 64 | |
| 65 | } // namespace interval_lib |
| 66 | } // namespace numeric |