When using the alternative quadratic formula to determine the roots, the root $x= \frac{2c}{-b + \sqrt{b^2-4ac}}$ becomes problematic due to catastrophic cancellation occurring in the denominator.
Could you explain an alternative approach for determining the problematic root and then use it to recompute this root?
Please refer to the picture for the complete question.
In both forms of the root formula, one of the sign variants may lead to catastrophic cancellation, while the other one is stable. Thus you always take as the first root the stable variant of the first root $$ x_1=\frac{-b-{\rm sign}(b)\sqrt{b^2-4ac}}{2a}. $$ Then the second root is stably computed as $x_2=\frac{c}{ax_1}$ or with the stable sign of the second formula $$ x_2=\frac{2c}{-b-{\rm sign}(b)\sqrt{b^2-4ac}}. $$ One can go further and try to avoid floating point over- and underflow in the computation of $b^2$ and $4ac$ under the root, but these cases should not occur in "textbook" test examples.