Re: quartic equations in root

From: Bob McElrath <bob+root_at_mcelrath.org>
Date: Tue, 11 Mar 2008 04:01:17 -0700


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 Carroll

Received on Tue Mar 11 2008 - 12:01:31 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 12 2008 - 11:50:01 CET