delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/09/10:46:40

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:mime-version
:content-transfer-encoding; q=dns; s=default; b=Gm5zEDv/cQB5b3h/
tppPRwPPmPXzuCYZHaThYefjTsJf70lqSVe/cnHaJ4xFKzYtivHHT8ybyfWBm99U
Q8x98p5GV9B+ujdxSJS9doYwxTFnsgsDH+np6A8fcOxPSpSzYB0p/24k/1weWO2s
wq81Fs97t1ZbPGAYnSGzBKszF4M=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:mime-version
:content-transfer-encoding; s=default; bh=6fbpw5qmvXLFzjzeq6/QRD
ngig4=; b=u0RyXnXTZlYULW0xiycLy9vTmVeT11pBxwN+5AdoKHKVUbOlXAfhH5
/6eTY0eaxI8RCl7YxopjA218hdrtnURx0+KquxllO1hwABmICK5Ooztv0SQMCjVc
jwRxufTI/4GZdalHmUQ9PpkRcs+tH6V5yygxXUDXS250tv/pHsQRo=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,SPF_PASS autolearn=ham version=3.3.2 spammy=dear, Tel, tel, commercial
X-HELO: mga12.intel.com
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
X-ExtLoop1: 1
From: "Soegtrop, Michael" <michael DOT soegtrop AT intel DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: Floating point exception in strtod()
Date: Mon, 9 Apr 2018 14:45:56 +0000
Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A177861A71E@IRSMSX102.ger.corp.intel.com>
References: <dd5e98ea-8f39-1c4b-116c-37968cb3a52d AT cornell DOT edu> <20180409094706 DOT GO18998 AT calimero DOT vinschen DOT de>
In-Reply-To: <20180409094706.GO18998@calimero.vinschen.de>
x-ctpclassification: CTP_NT
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2YwZDRmNzgtNDQyYy00OGE2LTg3NTgtYzM2ZmMzYTQxMGY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIxZ21mNEZ0aVp3Rkd0eUtyTHI0WGtKaDhQYjQwS08waXFRNFVcL1Y4UUJQVDQySHB6NFpRKzZVd3dzXC9ZTk01YngifQ==
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w39EkcYG002343

Dear Corinna,

> L is of type Long == int32_t, aadj is of type double.  The value of aadj at this time is 2529648000.0 == 0x96c75d80 which appears to be perfectly valid for a 32 bit int.

2529648000 is a valid unsigned long, but not a valid signed long. The largest 32 bit long is 2^31-1 = 2147483647. 0x96c75d80 interpreted as a signed long is a negative number.

I would say if floating point instructions are used to convert 2529648000 to a signed 32 bit integer, they should produce an FE_INVALID exception.
 
Best regards,

Michael
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019