|
On 10/07/2013 11:18 PM, Roberto Ierusalimschy wrote:
On many (all?) Intel CPUs, long double uses 80-bit floats, which have exactly 64 bits in their mantissas. So, they count correctly up to 2^64, but after that they lose precision. (Because of alignment, the sizeof of a long double usually is larger than 80 bits.)
Sorry if someone else already pointed this out, but on MSVC at least, long double is 64 bits:
"In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type."
http://msdn.microsoft.com/en-us/library/9cx8xs15.aspxLast I checked the Borland compiler had 80 bit long doubles. But since this type is only supported on the (legacy) FPU and not in SSE it doesn't surprise me that it isn't available in MSVC.
Ross.