cvs commit: src/sys/i386/include _types.h

David Schultz das at FreeBSD.ORG
Thu Mar 6 06:33:39 UTC 2008


On Wed, Mar 05, 2008, Colin Percival wrote:
> Setting the i387 FPU to 53-bit precision gives standards-compliant
> behaviour whether people are using "double" or "long double".

Not quite.

> Yes and no.  Double rounding isn't allowed;

Yes, it is.

> > The downside is that this breaks long doubles.
> 
> Except that it doesn't.  Using 53-bit precision for long doubles is
> a perfectly valid and standards-compliant option.

It's impossible to implement efficient library functions that
produce correct long double results when the FPU is set to 64-bit
mode and avoid double rounding and related problems when the FPU
is set to 53-bit mode. (Many of these functions use bit fiddling,
or range checks that are based on the expected width of the type,
for example.) In practice, there are other impediments to making
long doubles work correctly, such as constant folding and gcc's
lack of support for FENV_ACCESS.


More information about the cvs-src mailing list