Use explicit formula to solve quadratic polynomials.

polynomial.cc implements a companion matrix base method for solving
polynomials. This is both expensive and numerically sensitive.

This change adds a quadratic equation solver. Instead of using the
usual quadratic formula, it uses the formula suggested by BKP Horn
for improved numerical stability.

Change-Id: I476933ce010d81db992f1c580d2fb23a4457eb3e
1 file changed