6 #include "../UnivariatePolynomial.h"
11 template<
typename Coeff>
38 template<
typename Coeff>
81 CARL_LOG_TRACE(
"carl.core",
"UnivEEA: c1=" << c1 <<
", c2=" << c2 );
82 CARL_LOG_TRACE(
"carl.core",
"UnivEEA: d1=" << d1 <<
", d2=" << d2 );
91 CARL_LOG_DEBUG(
"carl.core",
"UnivEEA: g=" << c <<
", s=" << s <<
", t=" << t );
92 CARL_LOG_TRACE(
"carl.core",
"UnivEEA: " << c <<
"==" << s*a + t*b <<
"==" << s*a <<
" + " << t*b );
93 assert(c == s*a + t*b);
103 template<
typename Coeff>
#define CARL_LOG_TRACE(channel, msg)
#define CARL_LOG_DEBUG(channel, msg)
carl is the main namespace for the library.
UnivariatePolynomial< Coeff > extended_gcd(const UnivariatePolynomial< Coeff > &a, const UnivariatePolynomial< Coeff > &b, UnivariatePolynomial< Coeff > &s, UnivariatePolynomial< Coeff > &t)
Calculates the extended greatest common divisor g of two polynomials.
cln::cl_I gcd(const cln::cl_I &a, const cln::cl_I &b)
Calculate the greatest common divisor of two integers.
UnivariatePolynomial< Coeff > gcd_recursive(const UnivariatePolynomial< Coeff > &a, const UnivariatePolynomial< Coeff > &b)
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
void divide(const cln::cl_I ÷nd, const cln::cl_I &divisor, cln::cl_I "ient, cln::cl_I &remainder)
cln::cl_I remainder(const cln::cl_I &a, const cln::cl_I &b)
Calculate the remainder of the integer division.
A Variable represents an algebraic variable that can be used throughout carl.
This class represents a univariate polynomial with coefficients of an arbitrary type.
UnivariatePolynomial one() const
Creates a polynomial of value one with the same main variable.
Variable main_var() const
Retrieves the main variable of this polynomial.
const Coefficient & lcoeff() const
Returns the leading coefficient.
UnivariatePolynomial & normalizeCoefficients()
uint degree() const
Get the maximal exponent of the main variable.
UnivariatePolynomial normalized() const
The normal part of a polynomial is the polynomial divided by the unit part.
A strongly typed pair encoding the result of a division, being a quotient and a remainder.