This is the mail archive of the
mailing list for the Cygwin project.
Re: gcc -ffast-math defect with tan(x)
Dave Korn <dave.korn.cygwin <at> googlemail.com> writes:
> 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.
One experiment that I did, which confused me more than anything else, is
replace the calls to tan() with calls to log() (and change all the 0.0 values
to something OK for log() like 1.0). The generated assembly code appears to
be identical except that _f_tan is replaced by _f_log, but the program works
correctly. That would mean that the generated assembly code is correct, and
the defect is in _f_tan?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple