- #1
- 2,076
- 140
Homework Statement
This is not a homework problem, but rather a concern I had while reading. Not sure where I should've put this thread.
Homework Equations
The Attempt at a Solution
I was reading about how integers/floating point numbers were stored in a computer. For an n-bit word, the range of values stored would be from ##[-2^{n-1}, 2^{n-1} - 1]##.
The MATLAB environment follows the IEEE double-precision format specification where 8 bytes (or 64 bits) are used to represent floating point numbers. The first bit is used for the sign of the whole number. 11 bits are used for the exponent, 1 for the sign and 10 for the exponent itself. 52 bits are set aside for the mantissa.
Would this mean the 11 bits used for the exponent translate into a range from ##[-1024, 1023]##? The book seems to list it as ##[-1022, 1023]## , though I'm not sure why.
The largest positive real number, smallest positive real number and the machine epsilon would make much more sense if I could sort that bit out.