Click to See Complete Forum and Search --> : Seeking Code for Quartic Equation


DavidB
August 8th, 2006, 08:27 PM
Hi, folks.

I am working on some code that computes the four roots of a Quartic Equation:

a*x^4 + b*x^3 + c*x^2 + d*x + e = 0

(a, b, c, d, and e are real)

I presently have a working program, which computes the roots according to the textbook formula.

Now I would like to enhance the code by making it better handle rounding errors; there are a few cases where it yields incorrect results even though the textbook formula is coded correctly.

I am hoping somebody in these forums could point me in the right direction: Where would I find pseudo-code, source code, an algorithm discussion—anything—regarding writing a bullet-proof program for calculating the four roots of a Quartic Equation?

Any assistance is appreciated.

-- David

RoboTact
August 10th, 2006, 11:26 AM
You can estimate numerical error and give results with that estimation. Also there's stability, it may happen that for small changes in equation parameters roots will change significantly. So without domain requirements question is too vague.