This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Effects of newly introduced -mpcX 80387 precision flag


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]