## Polynomial Root-finder (Real Coefficients)

 This page contains a utility for finding the roots of a polynomial whose coefficients are real and whose degree is 100 or less. It is written in JavaScript, so make sure that JavaScript is enabled in your browser. References: The utility posted on this page is 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 sub-routines were 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.

 HOW TO USE THIS UTILITY In the "Polynomial Coefficients" box below, (i) first, enter the degree of the polynomial whose roots are to be sought, (ii) then enter the coefficients. Remember that the polynomial must be of degree 100 or less; in other words, up to 101 coefficients will be accepted (if more are present, the program terminates after outputting an appropriate error message). Enter the coefficients in order from highest degree to 0-th degree, one per line--nothing else. No commas, periods, brackets, etc. (Also note that numbers in scientific notation are NOT recognized). For example, assume we want to find the roots of the following equation: 3 x 4   +   5 x 2   +   17 x   +   19   =   0 Data input to the box should look as follows:
 4 3 0 5 17 19
 Note the 0 for the x 3 term. Once you click the "Find Roots" button, this utility will then seek the zeros. IMPORTANT:   Note the Error Code output.
 Polynomial Coefficients Enter the polynomial degree and coefficients (up to 101 coefficients): Error Code Error Code > 0:   Specifies the number of zeros found Error Code = 0:   The leading coefficient of the input polynomial was 0. Program terminated without doing anything. Error Code = -1:   The value entered as the degree of the polynomial was greater than 100. Program terminated without doing anything.