| 165 | } |
| 166 | |
| 167 | template<class T, class Policies> inline |
| 168 | interval<T, Policies> cosh(const interval<T, Policies>& x) |
| 169 | { |
| 170 | typedef interval<T, Policies> I; |
| 171 | if (interval_lib::detail::test_input(x)) |
| 172 | return I::empty(); |
| 173 | typename Policies::rounding rnd; |
| 174 | if (interval_lib::user::is_neg(x.upper())) |
| 175 | return I(rnd.cosh_down(x.upper()), rnd.cosh_up(x.lower()), true); |
| 176 | else if (!interval_lib::user::is_neg(x.lower())) |
| 177 | return I(rnd.cosh_down(x.lower()), rnd.cosh_up(x.upper()), true); |
| 178 | else |
| 179 | return I(static_cast<T>(1), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true); |
| 180 | } |
| 181 | |
| 182 | template<class T, class Policies> inline |
| 183 | interval<T, Policies> tanh(const interval<T, Policies>& x) |
nothing calls this directly
no test coverage detected