Re: Floating point exception in strtod()
- Date: Sat, 7 Apr 2018 16:56:13 -0400
- From: Eliot Moss <moss@xxxxxxxxxxxx>
- Subject: Re: Floating point exception in strtod()
On 4/7/2018 1:40 PM, Ken Brown wrote:
$ cat strtod_test.c
/* The following number comes from /usr/share/asymptote/ode.asy. */
const char *str = "121645100408832000.0";
strtod (str, &ptr);
/* If there was an exception, the following will not get executed. */
printf ("No exception.\n");
If I do the same thing WITHOUT the feenableexcept, it works fine.
Perhaps strtod catches an exception and then applies a different
method in some cases, or perhaps it wants exceptions off and
deals with things its own way.
If I include the feenableexcept, I get the same behavior you
reported (in 32-bit; I did not test 64-bit).
Regards - Eliot Moss
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple