WordPtr,IntPtr,IntMax,WordMax
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Thu May 11 13:56:55 EDT 2006
On Thu, 2006-05-11 at 14:57 +0100, Simon Marlow wrote:
> On the other hand, keeping intermediate Doubles to 80-bit precision is
> both (a) non-portable and (b) unpredictable (the programmer doesn't know
> which intermediates are going to be stored in 80 bits, and turning on
> optimisation will probably make a difference).
>
> I suppose you might argue that "extra precision is always good". But I
> like it when Haskell programs give the same results, regardless of the
> platform, compilation strategy, and level of optimisation.
>
> > (And while I'm on the subject, Haskell should have a LongDouble type.)
>
> LongDouble would be fine, but storing intermediate Doubles in 80 bits is
> bad.
I agree.
Note that if we did provide LongDouble that we would get the same
problems because the IEEE long double types are not precisely specified.
They specify minimum precision levels rather that fully specifying the
bit layout as in the IEEE 32 & 64 bit formats. Apparently both the x87
80-bit format and various implementations of 128bit formats conform to
the IEEE long double spec.
Duncan
More information about the Glasgow-haskell-users
mailing list