www.digitalmars.com         C & C++   DMDScript  

c++.command-line - long doubles

reply Norm <Norm_member pathlink.com> writes:
Does Digital Mars support 80-bit long doubles (like Borland)? If it does, the
"How Data is Stored" section of the "Compiler & Tools Guide Help is wrong: it
says long doubles are 64 bits.

Norm
Jul 31 2004
next sibling parent "Walter" <newshound digitalmars.com> writes:
"Norm" <Norm_member pathlink.com> wrote in message
news:cehsr7$1nh1$1 digitaldaemon.com...
 Does Digital Mars support 80-bit long doubles

Yes.
 (like Borland)?

I don't know how Borland does it.
 If it does, the
 "How Data is Stored" section of the "Compiler & Tools Guide Help is wrong:

 says long doubles are 64 bits.

That obviously needs fixing <g>.
Jul 31 2004
prev sibling parent "Gisle Vanem" <giva users.sourceforge.net> writes:
"Norm" <Norm_member pathlink.com> wrote:

 Does Digital Mars support 80-bit long doubles (like Borland)? If it does, the
 "How Data is Stored" section of the "Compiler & Tools Guide Help is wrong: it
 says long doubles are 64 bits.

DMC does support it, but only under Win32. See <float.h> for definitions. Borland vs DMC use the same layout for long doubles. How could they *not* do? Most of the calculations are done in silicon, so Intel and it's IEEE standard has set the scene here. From DMC's <float.h>: #define LDBL_MIN 0x1p-16382L #define LDBL_MIN_10_EXP -4932 and Borland: #define LDBL_MIN _tiny_ldble #define LDBL_MIN_10_EXP -4931 Someone is off by one here, but probably doesn't matter; the exponent is already 14 bits in long doubles AFAICR. But I don't understand why Borland uses an extern var instead of a constant LDBL_MIN etc. Avoiding inline math comparisons, linker problems? --gv
Aug 02 2004