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

Function fmod

gecode/third-party/boost/numeric/interval/arith2.hpp:31–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace numeric {
30
31template<class T, class Policies> inline
32interval<T, Policies> fmod(const interval<T, Policies>& x,
33 const interval<T, Policies>& y)
34{
35 if (interval_lib::detail::test_input(x, y))
36 return interval<T, Policies>::empty();
37 typename Policies::rounding rnd;
38 typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
39 T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper();
40 T n = rnd.int_down(rnd.div_down(x.lower(), yb));
41 return (const I&)x - n * (const I&)y;
42}
43
44template<class T, class Policies> inline
45interval<T, Policies> fmod(const interval<T, Policies>& x, const T& y)

Callers 2

cosFunction · 0.70
tanFunction · 0.70

Calls 7

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

Tested by

no test coverage detected