Template Function Utils::GCD

Function Documentation

template<typename Real>
void Utils::GCD(Poly<Real> const &p, Poly<Real> const &q, Poly<Real> &g)

Given \( p(x) \) and \( q(x) \) compute G.C.D, i.e. the polinomial \( g(x) \) such that \( q(x) | p(x) \) and \( g(x) | q(x) \) and if another polynomial \( h(x) \) is such that \( h(x) | p(x) \) and \( h(x) | q(x) \) then \( h(x) | g(x) \).