Pour VC6 en tout cas:
( Tiré de la msdn Oct 2000):
Long Double
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the long double, 80-bit precision data type. In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type. The Microsoft run-time library provides long double versions of the math functions only for backward compatibility. The long double function prototypes are identical to the prototypes for their double counterparts, except that the long double data type replaces the double data type. The long double versions of these functions should not be used in new code.
Double Functions and Their Long Double Counterparts
/ * ect. */
Et cepandant:
( Tiré de la msdn online):
Type long double
The range of values for a variable is bounded by the minimum and maximum values that can be represented internally in a given number of bits. However, because of Cs conversion rules ( discussed in detail in Type Conversions in Chapter 4) you cannot always use the maximum or minimum value for a constant of a particular type in an expression.
For example, the constant expression -32768 consists of the arithmetic negation operator ( ) applied to the constant value 32,768. Since 32,768 is too large to represent as a short int, it is given the long type. Consequently, the constant expression -32768 has long type. You can only represent 32,768 as a short int by type-casting it to the short type. No information is lost in the type cast, since 32,768 can be represented internally in 2 bytes.
The value 65,000 in decimal notation is considered a signed constant. It is given the long type because 65,000 does not fit into a short. A value such as 65,000 can only be represented as an unsigned short by type-casting the value to unsigned short type, by giving the value in octal or hexadecimal notation, or by specifying it as 65000U. You can cast this long value to the unsigned short type without loss of information, since 65,000 can fit in 2 bytes when it is stored as an unsigned number.
Microsoft Specific >
The long double contains 80 bits: 1 for sign, 15 for exponent, and 64 for mantissa. Its range is +/1.2E4932 with at least 19 digits of precision. Although long double and double are separate types, the representation of long double and double is identical.
END Microsoft Specific
Donc là, est-ce 80 bits, oui ou non? C,est supporté en 32 bits, oui ou non? Et puis, quesqu´ils entendent par " the representation of long double and double is identical" ? ?!
Kelios
---------