MCPcopy Create free account
hub / github.com/Gecode/gecode / cosh

Function cosh

gecode/third-party/boost/numeric/interval/transc.hpp:167–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167template<class T, class Policies> inline
168interval<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
182template<class T, class Policies> inline
183interval<T, Policies> tanh(const interval<T, Policies>& x)

Callers

nothing calls this directly

Calls 5

test_inputFunction · 0.85
is_negFunction · 0.85
emptyFunction · 0.70
upperMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected