Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2008 01:34:52 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        Colin Percival <cperciva@FreeBSD.ORG>
Cc:        src-committers@FreeBSD.ORG, Bruce Evans <bde@FreeBSD.ORG>, cvs-all@FreeBSD.ORG, cvs-src@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/include _types.h
Message-ID:  <20080306063452.GB48339@zim.MIT.EDU>
In-Reply-To: <47CF7EBF.6000009@freebsd.org>
References:  <200803051121.m25BLE03035426@repoman.freebsd.org> <20080305182531.GS68971@server.vk2pj.dyndns.org> <20080306021222.GA46783@zim.MIT.EDU> <47CF5D19.3090100@freebsd.org> <20080306033246.GA47280@zim.MIT.EDU> <47CF7EBF.6000009@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080306063452.GB48339>