35 ms·
Another thing to add to this: Factored equations can be computationally cheaper to execute.
by eckyptang 14y ago
Another thing to add to this: Factored equations can be computationally cheaper to execute.
- psykotic 14y agoNot if you use Horner's method. Evaluating a(x-p)(x-q) takes two additions and two multiplications. Evaluating ax^2 + bx + c with Horner's method as (ax + b)x + c takes two additions and two multiplications as well. Factoring a polynomial to save on evaluation is as inefficient and roundabout as factoring a pair of integers to help compute their greatest common divisor. You're replacing an easy problem with a much harder one.
- eckyptang 14y agoThat's a fair point. Perhaps my example was badly chosen!