enter image description here Suppose a machine with the floating-point system $\beta = 10$, $p = 8$, $L = -50$, and $U = 50$ is used to calculate the roots of a quadratic equation $ax^2 + bx + c = 0$, where $a$, $b$, and $c$ are given real coefficients. For each of the following, state the numerical difficulties that arise when using the standard formula for computing the root. Explain how to overcome these difficulties when possible.

enter image description here

I think the second one and third one have cancellation error since $b^2 \gg 4ac$, However, the first one is $b^2 \ll 4ac$, can someone what kind of error it causes and how to fix it.

  • $\begingroup$ What do those parameters mean for a FP system? $\endgroup$ – Amzoti Dec 3 '13 at 4:34
  • $\begingroup$ β = base of the number system; t = precision (# of digits); L = lower bound on exponent e; U = upper bound on exponent e. $\endgroup$ – user2759722 Dec 3 '13 at 4:37
  • $\begingroup$ You didn't tell us the value of t. Or, is t the same as p ?? $\endgroup$ – bubba Dec 3 '13 at 5:06

When $b^2 \ll 4ac$, there is not much of a problem. You can lose the $b^2$ term compared with $4ac$ when the ratio is smaller than the machine $\epsilon$, but that is reality. In this case you do need complex numbers, but that, too, is reality.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.