Equations (1.2) and (1.3) in Section 1.2 give alternative formulas for the roots x1 and x2 of ax2 + bx + c = 0. Construct an algorithm with input a, b, c and output x1, x2 that computes the roots x1 and x2 (which may be equal or be complex conjugates) using the best formula for each root. |
New search. (Also 1294 free access solutions) |