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
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