#include <CGAL/Polynomial.h>
#include <CGAL/Polynomial_traits_d.h>
#include <CGAL/Polynomial_type_generator.h>
#include <CGAL/Gmpz.h>
int main(){
typedef CGAL::Gmpz Int;
Poly_1 x = PT_1::Shift()(Poly_1(1),1);
Poly_1 F
= 2 * CGAL::ipower(x,4) + 1 * CGAL::ipower(x,3)
- 3 * CGAL::ipower(x,2) - 1 * CGAL::ipower(x,1)
+ 1 * CGAL::ipower(x,0);
std::cout << "F=" << F << std::endl;
Poly_1 G
= 1 * CGAL::ipower(x,2) + 4 * CGAL::ipower(x,1) + 3 * CGAL::ipower(x,0);
std::cout << "G=" << G << std::endl;
std::cout <<
"The resultant of F and G is: " <<
resultant(F,G) << std::endl;
PT_1::Principal_sturm_habicht_sequence stha;
std::vector<Int> psc;
stha(F,std::back_inserter(psc));
std::cout << "The number of real roots of F is: " << roots << std::endl;
std::cout << "The number of real roots of G is: " << roots << std::endl;
return 0;
}