commit | 1284a5141426597f3ca1e29ae8548c9b4c43c9c1 | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Sun Nov 24 15:09:43 2013 -0800 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Mon Nov 25 09:49:16 2013 -0800 |
tree | 53f0bf6c0b2735595751cfb4c12e7790072186de | |
parent | a9334d67d7973c0f56e65f12ae897dd53504ef0d [diff] |
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