This is the mail archive of the cygwin mailing list for the Cygwin 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: gcc -ffast-math defect with tan(x)

eric_backus@agilent wrote:

> I get this output from both gcc-3 (which is 3.4.4) and from gcc-4 (which is 4.3.4), when -ffast-math is used.  If I remove -ffast-math, I get the expected output of 0 for both d1 and d2.  If I compile with -mno-cygwin on gcc-3, either with or without -ffast-math, I get the expected output of 0 for both d1 and d2.  So the problem seems to be limited to -ffast-math, and to the cygwin (non-mingw32) platform, and perhaps to relatively recent versions of gcc.
> My completely uninformed guess is that this is a cygwin-specific defect in gcc.  But I really don't know.
> Any ideas how I should deal with this would be helpful!

  Thanks for the STC.  The difference between -ffast-math and -fno-fast-math
is that the fast version calls the _f_tan newlib fast math function rather
than tan.  I think this is likely to be a calling-convention issue but I'm
still debugging it.


Problem reports:
Unsubscribe info:

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