X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=G7t UhArnIFXGbnLifHvx714tuqZOO2bPtsCGY9TZFnVHpNii/CTO0SHvt4J9+2Qx+2/ XdF4IVBFxmOTLxjm9KcOJAt+WKgPGOyWsKDSfwvhzc1wehUnEXHRBNrdjselk1tK E2OIW/iD0Z71WqnPcif+8eJ7QxcHH4NmdmvPEk+M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=d3TqJTL3F YYHeSg3d8WW5cCoaUk=; b=hVCulyd7I1WbdrWUNnVWzMgW7Fl7dojmUkUa9hyim ObZkVATpumimkrEiqAXLOHU6sp5P25+qqFyrv7YU4gYMlNEx/vBZcyqPM8rbtKbL r20tmrv8N0+jXdKYJux/cpa4xmDoc6JTVkRImbaZ6n3tGnnIEjzg1O4BsOj+qS5I rk= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*MI:edu, H*Ad:D*edu, H*r:may, H*r:forged X-HELO: limerock02.mail.cornell.edu X-CornellRouted: This message has been Routed already. To: cygwin From: Ken Brown Subject: Floating point exception in strtod() Message-ID: Date: Sat, 7 Apr 2018 13:40:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes $ cat strtod_test.c #include #include #include int main () { /* The following number comes from /usr/share/asymptote/ode.asy. */ const char *str = "121645100408832000.0"; char *ptr; feenableexcept (FE_INVALID); strtod (str, &ptr); /* If there was an exception, the following will not get executed. */ printf ("No exception.\n"); } $ gcc strtod_test.c $ ./a Floating point exception (core dumped) [The above was on x86. On x86_64 there's simply no output.] I have no idea what's special about the number 121645100408832000.0, but the problem goes away if, for example, I replace the leading 1 by 2. Ken -- 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