Port-amd64 archive

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

Re: Changing the default i387 precision



Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:

> On Sat, May 04, 2013 at 12:33:08PM -0400, Greg Troxel wrote:
>> I still cannot follow exactly what you are proposing to change.
>
> The default rounding mode to give full internal precision.

I think that by default, programs should get behavior compliant with
IEEE754.

Anyone interesting in numerical issues should run
pkgsrc/benchmarks/paranoia, if they haven't already.  My impression is
that this program is widely viewed as the gold standard for correctness
of floating point implementations, and probably we ought to bring it
into our regression test framework.

On netbsd-6/i386 (and netbsd-5), the result is:

  No failures, defects nor flaws have been discovered.
  Rounding appears to conform to the proposed IEEE standard P754,
  except for possibly Double Rounding during Gradual Underflow.
  The arithmetic diagnosed appears to be Excellent!

I get that also on netbsd-5/amd64.  Note that paranoia in pkgsrc has
-ffloat-store.  When removing -ffloat-store on netbsd-5/amd64, the
results are still ok (presumably because of SSE).

When removing -ffloat-store on netbsd-6/i386 (and netbsd-5),
paranoia complains about many things.

On an intel mac (Core 2 Duo, 10.7), building i386 binaries (from pkgsrc
bootstrapped with -m32), the right answer is obtained with or without
float-store.


So it seems we don't set the default precision right on i386 as it
is, and that should be fixed.

I'm not really sure what your goal is.  I can see the appeal of having
"long double" have greater precision, but I think it's far more
important to have IEEE754-compliant behavior for programs that don't try
to set anything.   Can't a user set rounding/precision modes
intentionally if they are a long double user?

Attachment: pgptC8HHWm82i.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index