|
|
<lawrence.jones@xxxxxxxxxxx> wrote in message
news:t15tb5-gh6.ln1@xxxxxxxxxxxxxxxxxxx
> santosh <santosh.k83@xxxxxxxxx> wrote:
>>
>> Obviously they are saying that 128 bit long doubles are not yet
>> supported. That doesn't mean that a smaller long double isn't.
>> Currently they seem to be using 96 bit long doubles.
>
> Their long double only has 96 value bits but its size is 16 (8 bit)
> bytes, so it's 128 bits in size. And there's no requirement in C99 to
> support 128 bit long doubles, so even if they did want to support long
> double with 128 value bits sometime in the future, it wouldn't be a
> conformance issue now. I can only assume that their long double support
> is deficient in some way, but their conformance statement certainly
> doesn't provide any hints as to exactly what the deficiencies are.
I suspect that the real reasoning is that they do not want to support
another floating point type because:
1. Long double is a lot more difficult to get right (so that the answers
returned are close to 1/2 ULP in accuracy).
2. Math library has 2/3 as much code (with only float and double but not
long double implementation) so a lot less effort supporting it, testing it,
documenting it, etc.
3. If 128 bit platforms are also included, it would mean yet another
version. Of course, the Cephes collection handles all of this nicely. I
think it would be good to make the Cepehs collection a "Reference"
implementation which can be selected or ignored because it is so fully
complete.
Anyway, I think that the reasons are pure laziness {especially considering
that they already had the routines written long ago since they were included
with the 16 bit compiler}. The worst thing is that Intel followed suit
after MS dropped the ball.
In C++ there is a nice work around, since I can use QD:
http://crd.lbl.gov/~dhbailey/mpdist/
to create my own double-double and quad-double libraries to get lots more
precision if I want it but using C it would be a real pain. Without a
hardware type, intermediate precisions like that become an ugly mess of
library calls instead of the simple, fundamental algorithms that they ought
to be.
--
Posted via a free Usenet account from www.teranews.com">http://www.teranews.com
|
|