I know that size of various data types can change depending on which system I am on.
I use XP 32bits, and using the sizeof()
operator in C++, it seems like long double
is 12 bytes, and double
is 8.
However, most major sources states that long double
is 8 bytes, and the range is therefore the same as a double
.
How come I have 12 bytes? If long double
is indeed 12 bytes, doesn't this extends the range of value also? Or the long signature is only used (the compiler figures) when the value exceed the range of a double, and thus, extends beyond 8 bytes?