X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Backus Subject: Re: gcc -ffast-math defect with tan(x) Date: Tue, 17 Nov 2009 13:36:36 +0000 (UTC) Lines: 19 Message-ID: References: <4B028ED0 DOT 5070600 AT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dave Korn 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