24 #ifndef PPL_math_utilities_defs_hh
25 #define PPL_math_utilities_defs_hh 1
33 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
34 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
41 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
42 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
47 Coefficient_traits::const_reference x,
48 Coefficient_traits::const_reference y);
50 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
51 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
57 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
58 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
64 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
65 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
71 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
72 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
78 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
89 normalize2(Coefficient_traits::const_reference x,
90 Coefficient_traits::const_reference y,
93 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
94 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
99 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
102 template <
typename T>
110 #endif // !defined(PPL_math_utilities_defs_hh)
Enable_If< Is_Native_Or_Checked< T >::value, void >::type numer_denom(const T &from, Coefficient &numer, Coefficient &denom)
Extract the numerator and denominator components of from.
void max_assign(N &x, const N &y)
Assigns to x the maximum between x and y.
T low_bits_mask(unsigned n)
Returns a mask for the lowest n bits,.
Enable_If< Is_Native_Or_Checked< T >::value, void >::type div_round_up(T &to, Coefficient_traits::const_reference x, Coefficient_traits::const_reference y)
Divides x by y into to, rounding the result towards plus infinity.
bool is_canonical(const mpq_class &x)
Returns true if and only if x is in canonical form.
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_even(const T &x)
Returns true if and only if x is an even number.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type is_additive_inverse(const T &x, const T &y)
Returns true if and only if .
The entire library is confined to this namespace.
void normalize2(Coefficient_traits::const_reference x, Coefficient_traits::const_reference y, Coefficient &n_x, Coefficient &n_y)
If is the GCD of x and y, the values of x and y divided by are assigned to n_x and n_y...
void min_assign(N &x, const N &y)
Assigns to x the minimum between x and y.