I always try to relate these floating point issues back to real situations. Is there really a case where you would use a quadratic equation such as this and what kind of precision would you really be interested in? In the first example, the root is wrong by 25% in percentage terms but is wrong by less than 2.5e-9 in absolute terms.
What is important is to tailor your maths to the real problem you are solving (and remember garbage in = garbage out). Very rarely do you actually need 53 bits of precision (as you get in a double), or even need to store intermediate results with 53 bits of precision.
What is important is to tailor your maths to the real problem you are solving (and remember garbage in = garbage out). Very rarely do you actually need 53 bits of precision (as you get in a double), or even need to store intermediate results with 53 bits of precision.