Quadratic Equation Solver

 

This page contains a routine that solves a Quadratic Equation.

References:
The utility posted on this page includes a Javascript translation of the FORTRAN routine RPOLY.FOR, which is posted off the NETLIB site as TOMS/493. Although all care has been taken to ensure that the code was translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routines have been thoroughly tested and work properly. Please report any errors to the webmaster.



Once the problem is arranged into the following form (a, b, and c are known constants), the equation can be solved for values of x that satisfy the equation:

a x 2 + b x + c = 0

Since the equation is a second degree equation (the equation's highest power is two), there will be two solutions.

This utility is not required if a = 0. However, if for some reason 0 is input for a, only one solution exists.

Input the values for a, b, and c below, and then click the "Calculate Solutions" button to have the results calculated.
NOTE: The solutions may include a non-zero imaginary component, as indicated by the "i" field.

   
a: b: c:
   

 

Return to Math Functions Page

AKiTi.ca Home