From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20147 invoked by alias); 11 Oct 2011 19:25:31 -0000 Received: (qmail 20137 invoked by uid 22791); 11 Oct 2011 19:25:30 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Oct 2011 19:25:16 +0000 From: "gpib at rickyrockrat dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/50695] double comparison broken after computation Date: Tue, 11 Oct 2011 19:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gpib at rickyrockrat dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg01048.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695 --- Comment #7 from rickyrockrat 2011-10-11 19:25:10 UTC --- I removed the ','at the beginning of the string (which was not there in the original test case), and I now get Bug!!4.074850E+05 In any case, it should return 0, if +1.xxE-6 is an invalid number. When I include these includes: #include #include #include my print looks like this: Bug!!1.000000E-06 Which is what perplexed me in the first place. It seems if I include stdlib.h, I get Bug!!4.074850E+05 If I don't include it, I get: Bug!!1.000000E-06, which is what prompted this bug report in the first place.