What is the roundoff error when we represent $2^{-1} + 2^{-25}$ by a machine number? (Note: this refers to absolute error, not relative)
Please, help
What is the roundoff error when we represent $2^{-1} + 2^{-25}$ by a machine number? (Note: this refers to absolute error, not relative)
Please, help
Assuming a Single precision IEE754 number.
You have a sign bit: 0 is positive, 1 is negative
8 bits for the exponent with a -127 offset (range -127 to +128)
A 24 bit mantissa. The top bit is always assumed to be 1 so only 23 bits are stored.
For your example you need 25 bits of mantissa so $2^{-25}$ is too small to fit and the closest you can get is $2^{-1} = \frac{1}{2}$
The absolute error is therefore $2^{-25}$.
Note. With double precision numbers the absolute error would be zero.
doubles. What do you know about the representation of "machine numbers"? – Daniel Fischer Sep 17 '13 at 09:200x30400000, with sign bit $0$ exponent bits $0110000$ and mantissa bits $10000000000000000000000$ mean? – Daniel Fischer Sep 17 '13 at 10:06