Complex number functions for std.math

Anders F Björklund afb at algonet.se
Mon Apr 10 01:23:06 PDT 2006


Dave wrote:

>> That certainly is the core of the issue. The D specification contains a
>> bit of theoretical talk about portability, but effectively the language
>> is an x86-only language only.
> 
> Hrm, that's a little strong: http://home.earthlink.net/~dvdfrdmn/d/
> GDC's been running on AIX and non-intel Mac for a while now. IIRC, 
> elsewhere there has been a working port for HPUX as well.

On PowerPC, the "real" type is the same as the "double" type.

The new 128-bit long double type in GCC 4.0 and Mac OS X 10.4
can't be used for D language since it is not fully compliant.
(being made out of two linked double registers, it doesn't do
all of the exceptions in the same way. Same format, though...)

SPARC should have a real 128-bit long double type, I think.
Not sure if it's in hardware or if it is emulated, though ?


The silly thing about the 80-bit/long double on X86, besides
that not every compiler supports it, is the size/alignment:

                         size    align
DM Windows (32-bit)     10      2
Mac OS X86 (32-bit)     16      16
GCC Linux (32-bit)      12      4
GCC Linux (64-bit)      16      16

Not that the larger storage formats buys you extra precision,
it's just padded with zeros... (for better alignment I think)

--anders



More information about the Digitalmars-d mailing list