Consider two positive numbers $x = p2^m$ and $y = q2^n$ such that $m > n$, $1 < p < 2$, and $1 < q < 2$. Both of these numbers can be stored using the IEEE 64 bit standard.

What is the maximum number of significant bits lost when the computer evaluates $x − y$?

  • $\begingroup$ This looks like a homework question to me. Hint: What happens during subtraction when $x$, $y$ are consecutive floating-point numbers? A related issue possibly of interest: Sterbenz lemma. $\endgroup$ – njuffa Mar 22 '17 at 18:54
  • $\begingroup$ I am aware of this fact. This has to do something with "Loss of Precision Theorem". But I am unable to figure out the exact bit loss.. Can bit loss be greater that 11(i.e bits to save exponent )? $\endgroup$ – user427820 Mar 23 '17 at 12:46
  • $\begingroup$ My suggestion: work through a subtraction of two consecutive floating-point numbers by hand. Note that the restrictions in the question do not seem to allow consecutive floating-point numbers (but two numbers that are very close). Considering the case of consecutive floating-point numbers first should be helpful in understanding the mechanics and should get you 95% of the way to the final answer. $\endgroup$ – njuffa Mar 24 '17 at 2:15

Your Answer

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

Browse other questions tagged or ask your own question.