Subject: Re: accuracy of "long double"
To: Neil Booth <>
From: Steven M. Bellovin <>
List: tech-toolchain
Date: 08/28/2007 17:01:52
On Wed, 29 Aug 2007 00:25:24 +0900
Neil Booth <> wrote:

> Vincent wrote:-
> > >honor TARGET_96_ROUND_53_LONG_DOUBLE while optimizing (and a
> > >couple of the failures are due to incorrect test cases that assume
> > >that "everything work as Linux"...)
> > >I plan to fix this before gcc 4.3 is released...
> > 
> > Well, since I am currently writing some mathematical stuff, can
> > someone be more specific about this issue? I mean:
> > 
> > * Does it mean that "double" precision roundoff is correct on BSD, 
> > whereas "long double" is not ? and vice-versa on Linux?
> You will only get IEEE semantics with x87 FPU for 80-bit long double
> with long-double precision.  Every other mode is non-IEEE.
> Which means the only one that follows IEEE by default is long double
> on Linux.  You could get the same on NetBSD by changing the CPU
> flags so that you have long double precision.
> You can't get IEEE behaviour for double on x86 without SSE2.
I would add that given the amount of effort that went into the IEEE
effort, using it is almost certainly the right choice for most people.

		--Steve Bellovin,