Math functions and Floating point types
lanceboyle at bluebottle.com
lanceboyle at bluebottle.com
Tue Nov 29 10:55:47 CET 2005
Jerry (me) said this:
>> Thanks--very helpful. BTW, doesn't Ada have a (portable) type for the
>> longest native floating point format supported on each processor?
>> That seems rather useful.
>>
>
Then Frank said this:
> GPC has LongestReal for the longest available real type. Portable
> .... well, it's defined everywhere, but of course, it's not the same
> type everywhere (I suppose the same would go for Ada), so care is
> required when using it for data exchange or such.
>
> Frank
>
In another post, Adriaan said this:
> For the Mac, the situation is somewhat confusing.
>
> On Mach-O Intel, the size of LongReal and Extended will be 16
> bytes. Note that the Extended and LongReal types are still crashing
> in the Mach-O Intel compiler download from my website (because the
> size was wrongly 12 bytes and this was only recently fixed).
> Whatever the size, the precision is only 80 bits because of the 387
> coprocessor (which is absurd but I can not help it).
>
> On Mach-O PowerPC, the size of LongReal and Extended is 8 bytes.
> However, we may change it to 16 bytes, because Apple now supports
> 128-bit doubles in Mac OS X 10.3.9 and higher (this would mean
> building the compiler and runtime with mlong-double-128 but I
> haven't tried it yet).
>
> Regards,
>
> Adriaan van Os
Now, I'm saying this:
But isn't there potentially a difference between the longest
_natively_supported_ float per hardware, and the longest float, which
might be partially software-implemented? For speed, it would still
seem like a good idea to have a type which defaults to the longest
natively supported length.
Sorry if this is beating the subject to death.
Jerry
More information about the Gpc
mailing list