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: Sine and Cosine Accuracy



On 31/05/2005, at 6:34 AM, Paul Koning wrote:


"Geoffrey" == Geoffrey Keating <geoffk@geoffk.org> writes:


Geoffrey> Paul Koning <pkoning@equallogic.com> writes:


After some off-line exchanges with Dave Korn, it seems to me that
part of the problem is that the documentation for
-funsafe-math-optimizations is so vague as to have no discernable
meaning.


Geoffrey> I believe that (b) is intended to include:


Geoffrey> ... - limited ranges of elementary functions

You mean limited range or limited domain?  The x87 discussion suggests
limiting the domain.

Both. (For instance, this option would also cover the case of an exp () which refuses to return zero.)


  And "limited" how far?  Scott likes 0 to 2pi;
equally sensibly one might recommend -pi to +pi.

I guess another way to put it is that the results may become increasingly inaccurate for values away from zero or one (or whatever). (Or they might just be very inaccurate to start with.)


All these things may well make sense, but few or none of them are
implied by the text of the documentation.

I think they're all covered by (b).


It is intentional that the documentation doesn't specify exactly how the results differ from IEEE. The idea is that if you need to know such things, this is not the option for you.


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