David's Blog

Living a quiet life in Coquitlam, B.C.

Location: Coquitlam, British Columbia, Canada

Monday, August 14, 2006

Quadratic Equation Solver to get a Complete Workover

I thought it was time to completely re-work the code for the three polynomial root-finding utilities I had written (solvers for the Quadratic, Cubic, and Quartic equations).

Presently, all three programs are simply codings of the textbook formulae for the roots of these equations. However, the textbook formulae do not properly deal with and quantify errors that arise when dealing with floating-point numbers in a computer program.

So I am presently in the process of re-writing all three programs like a proper computer scientist should: assume round-off errors will be present, and code to handle them properly (ideally, keep their effects to a minimum, and quantify them so that a user has some idea how meaningful the results are). I have found some highly-recommended code (in FORTRAN) for a general polynomial solver and am translating it into C++. Once that is done, I plan to post it by itself as a generic solver (as it is supposed to be). I will then further re-write the code into three separate programs, customized specifically for each case of polynomial in which I am interested (degree two, three, and four).


Post a Comment

<< Home