| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <4B028ED0.5070600@gmail.com> |
| Date: | Tue, 17 Nov 2009 11:53:52 +0000 |
| From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
| User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: gcc -ffast-math defect with tan(x) |
| References: | <AE5F3949C74C6547AEAEAB87D1AC7F1B057788A6 AT cos-us-mb01 DOT cos DOT agilent DOT com> |
| In-Reply-To: | <AE5F3949C74C6547AEAEAB87D1AC7F1B057788A6@cos-us-mb01.cos.agilent.com> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
eric_backus AT 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.
cheers,
DaveK
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |