public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Floating point exception in strtod()
Date: Mon, 09 Apr 2018 15:33:00 -0000	[thread overview]
Message-ID: <20180409153301.GH29703@calimero.vinschen.de> (raw)
In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A177861A71E@IRSMSX102.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

On Apr  9 14:45, Soegtrop, Michael wrote:
> 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.

...which is what I described in the rest of my mail :)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-04-09 15:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07 17:40 Ken Brown
2018-04-07 20:52 ` Dan Kegel
2018-04-08 12:57   ` Soegtrop, Michael
2018-04-07 20:56 ` Eliot Moss
2018-04-08  3:12   ` Duncan Roe
2018-04-08 10:25     ` Hans-Bernhard Bröker
2018-04-09  9:47 ` Corinna Vinschen
2018-04-09 12:09   ` Ken Brown
2018-04-09 12:51     ` Corinna Vinschen
2018-04-09 14:46   ` Soegtrop, Michael
2018-04-09 15:33     ` Corinna Vinschen [this message]
2018-04-09 15:55       ` Soegtrop, Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180409153301.GH29703@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).