GDC release 0.23

Don Clugston dac at nospam.com.au
Wed Mar 7 23:15:02 PST 2007


Anders F Björklund wrote:
> Don Clugston wrote:
> 
>>>>> Older versions of PPC operating systems used 64-bit for "long double",
>>>>> newer versions use 128-bit. Both are still in use, so we won't know.
>>>>
>>>> Ugh. That's really horrible.
>>>
>>> It's called progress :-)
>>
>> I was referring to the entire section, not just that line.
> 
> Seriously, there was a lot of effort put into supporting 128-bit
> long doubles - but I guess it was done with less emphasis on it
> being IEEE correct and handling exceptions then what D demands ?
> 
> The D spec should probably mention whether it absolutely requires
> the type to conform to the IEEE floating-point standard or not...
> i.e. whether it should just map over to C/C++ "long double" or not.
> 
>>> I'll let David decide which one wins: D real === C long double, or
>>> the definition of "largest hardware implemented floating point size"
>>
>> There's just no way D real can be equal to C long double in general, 
>> when the C long double is playing silly games. The only reason gcc can 
>> even do that, is that the C spec for floating point is ridiculously 
>> vague, and consequently no-one actually uses long double. To mimic it 
>> is to immediately break D's support for IEEE.
> 
> We can equate D "real" with C "long double", and just avoid using
> it on those platforms where it doesn't match the hardware size ?
> But then "real" would be a bad name for it, that I agree with...
> 
>> Seriously, the viability of D as a numeric computing platform is at 
>> stake here.
> 
> Only on the PowerPC platform, though. Maybe on SPARC too, not sure.
> (it might have real 128-bit ?) 

SPARC has true 128-bit IEEE reals, but they're not actually implemented 
(!). Actually the Linux 16-byte 80-bit reals are binary compatible with 
128-bit IEEE reals (just that the final 128-80 bits are always set to zero).

But not on the DMD platform: Intel,
> there it will have full 80-bit support (even if not too portable).

My perspective is that I've been writing most of the Tango math library, 
trying to make it portable -- but it's just infeasible when this 
double+double type pops up. It just has almost nothing in common with 
the hardware real types!

> 
> --anders



More information about the Digitalmars-d-announce mailing list