This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Effects of newly introduced -mpcX 80387 precision flag
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Bradley Lucier <lucier at math dot purdue dot edu>
- Cc: Richard Henderson <rth at redhat dot com>, gcc mailing list <gcc at gcc dot gnu dot org>, Richard Guenther <richard dot guenther at gmail dot com>
- Date: Thu, 03 May 2007 17:11:13 +0200
- Subject: Re: Effects of newly introduced -mpcX 80387 precision flag
- References: <D78A6CE9-4B67-46AC-9279-732C64E068C6@math.purdue.edu>
Bradley Lucier wrote:
I just (re-)discovered these tables giving maximum known errors in
some libm functions when extended precision is enabled:
http://people.inf.ethz.ch/gonnet/FPAccuracy/linux/summary.html
and when the precision of the mantissa is set to 53 bits (double
precision):
http://people.inf.ethz.ch/gonnet/FPAccuracy/linux64/summary.html
This is from 2002, and indeed, some of the errors in double-precision
results are hundreds or thousands of times bigger when the precision
is set to 53 bits.
I think the warning in the documentation is very mild considering the
possible effects.
Perhaps the manual should also mention that sometimes this option
brings a 2% improvement in the speed of FP-intensive code along with
massive increases in the error of some libm functions, and then people
could decide if they want to use it. (I'm not opposed to a switch
like this, my favorite development environment sets the precision to
53 bits globally just as this switch does, but I think the
documentation should be more clear about the trade-offs.)
Could you please post a patch with suggested wording about this option
(I was trying to write something similar to the warning that icc has in
its documentation about precision settings).
Thanks,
Uros.