Write a routine for computing the two roots x1 and x2 of the quadratic equation f (x) = ax2 + bx + c = 0 with real constants a, b, and c and for evaluating f (x1) and f (x2). Use formulas that reduce round off errors and write efficient code. Test your routine on the following (a, b, c) values: (0, 0, 1); (0, 1, 0); (1, 0, 0); (0, 0, 0); (1, 1, 0); (2, 10, 1); (1,−4, 3.99999); (1,−8.01, 16.004); (2 × 1017, 1018, 1017); and (10−17,−1017, 1017).
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.