Yes, use the ROOT::Math::Polynomial class in Math/Polynomial.h. e.g.
ROOT::Math::Polynomial poly(4);
double coeffs[5] = {1,2,3,4,5};
poly.SetParameters(coeffs);
vector<complex<double> > roots;
roots = poly.FindNumRoots();
This is an interface to the GSL library, and is in the MathMore root library, which may not be compiled into your root distribution. I have had to hand compile root to get it.
Jan Therhaag [therhaag_at_physik.uni-bonn.de] wrote:
> Hi,
>
> I would like to solve a system of equations which includes linear,
> quadratic and quartic equations. Linear and quadratic is not a problem, but
> I don't know how to tackle the quartic ones. Is there a solution for
> quartic equations implemented in root?
>
> Thank you
> Jan
-- Cheers, Bob McElrath [ CERN Theory Division ] "Why, sometimes I've believed as many as six impossible things before breakfast." -- Alice in Wonderland, Lewis CarrollReceived on Tue Mar 11 2008 - 12:01:31 CET
- application/pgp-signature attachment: Digital signature
This archive was generated by hypermail 2.2.0 : Wed Mar 12 2008 - 11:50:01 CET