Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing the default i387 precision

On Sat, May 04, 2013 at 08:50:29AM -0400, Greg Troxel wrote:
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:
> > On Sat, May 04, 2013 at 07:14:00AM -0400, Greg Troxel wrote:
> >> So are you proposing then
> >> 
> >>   1) Make gcc and clang use larger storage (maybe already true) and avoid
> >>   SSE instructions for variables declared as long double?
> >
> > That's already the case. long double computations always use the i387.
> > The point is that I want them to get the extended precision.
> If what you want to do now is to change the way rounding is handled so
> that:
>    long double variables get the 80-bit precision
> without
>    making (non-long) doubles get results that don't comply with IEEE754
>    (by using extended precision intermedate values)
> then that sounds fine.  But I can't really tell what you want to change.

ISO C99 specifies rules on when the compiler is allowed to use a higher
precision for intermediate values and when not. That includes macros for
deciding what types the math is done in. We get away with our hack
mostly because underflow/overflow are rare enough that the larger
exponent is not visible. See also -ffloat-store and


Home | Main Index | Thread Index | Old Index