This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14047] strtof gives spurious ERANGE errors
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 02 May 2012 10:46:40 +0000
- Subject: [Bug libc/14047] strtof gives spurious ERANGE errors
- Auto-submitted: auto-generated
- References: <bug-14047-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14047
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-05-02 10:46:40 UTC ---
It's not clear to me if this should set errno to ERANGE or not. IEEE
754-2008 (section 7.5) says:
In addition, under default exception handling for underflow, if the
rounded result is inexact - that is, it differs from what would have been
computed were both exponent range and precision unbounded - the underflow
flag shall be raised and the inexact (see 7.6) exception shall be
signaled. If the rounded result is exact, no flag is raised and no inexact
exception is signaled. This is the only case in this standard of an
exception signal receiving default handling that does not raise the
corresponding flag. Such an underflow signal has no observable effect
under default handling.
So does ERANGE for underflow correspond to the underflow exception being
signaled (in which case errno should be set to ERANGE) or to the flag
being raised (in which case errno should not be set to ERANGE)? I'll see
what the WG14 reflector thinks.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.