[GiNaC-devel] Roots of polynomial

Rekha Penmetsa rekhapenmets at gmail.com
Fri Nov 8 03:09:58 CET 2013


Hi,

I am using GiNaC in my project. I want to find roots of a univariate
polynomial. I am deriving a polynomial from a matrix determinant,
which is coming to,

  6-1/15*r-19/3138418483200*r^4-23/20713561989120000*r^5+1/18900*r^2-71/7264857600*r^3

I am using RealAlgebraicNumberFactory::realRoots() method as in the
below code to find roots. I have installed GiNaCRA as well and example
programs are compiling and running fine.

RationalUnivariatePolynomial p(det,r);
list<RealAlgebraicNumberPtr> roots = RealAlgebraicNumberFactory::realRoots( p );

This call is returning a list of zero size. Am I missing anything ?
how to solve for roots for polynomials of this type?


Thanks
Rekha



More information about the GiNaC-devel mailing list