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)


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.
> 
>     cheers,
>       DaveK

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?

-- 
Eric


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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