[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Finding the 'double' resolution
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 19 Jul 2001 16:03:54 -0300 (EST)
>-- val1 = 9007199254740992
>
>val1 is the first value, on my system (Windows NT on Duron), where an
>increment of 1 isn't signifiant.
Yes, 9007199254740992 = 2^53.
On Intel machines (and most others) doubles are represented using the IEEE 754
standard, which has 52 bits for the mantissa. (There's a hidden bit and so
the precision is actually 53 bits.) For an explantion, see
http://www.research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html
For single-precision floats, the limit would be 2^24.
--lhf