public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/5680] New: math functions (atanh, log, log1p) are inconsistent in treatment of errno
@ 2008-01-26  2:46 dickinsm at gmail dot com
  2008-07-22 14:17 ` [Bug math/5680] " mtk dot manpages at gmail dot com
  0 siblings, 1 reply; 3+ messages in thread
From: dickinsm at gmail dot com @ 2008-01-26  2:46 UTC (permalink / raw)
  To: glibc-bugs

In version 2.5 of glibc, on SuSE Linux 10.2, it appears that the libm functions atanh, log and log1p (and 
possibly others) are inconsistent in their handling of singularities:

log(0.0) returns -Infinity and sets errno = ERANGE
log1p(-1.0) returns -Infinity and doesn't set errno
atanh(-1.0) returns -Infinity and sets errno = EDOM.

According to the C99 standard (appendix F), and IEEE-754r, all of these operations should behave in 
the same way---they should all return -Infinity and raise the "divide-by-zero" exception. This makes 
sense mathematically:  all three function calls correspond to singularities of log type.  Admittedly, the 
C99 standard has little to say about errno, but I don't understand why these three calls behave 
differently with respect to setting of errno.

-- 
           Summary: math functions (atanh, log, log1p) are inconsistent in
                    treatment of errno
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: aj at suse dot de
        ReportedBy: dickinsm at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=5680

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-02  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-5680-131@http.sourceware.org/bugzilla/>
2012-02-29 20:13 ` [Bug math/5680] math functions (atanh, log, log1p) are inconsistent in treatment of errno jsm28 at gcc dot gnu.org
2014-07-02  7:44 ` fweimer at redhat dot com
2008-01-26  2:46 [Bug math/5680] New: " dickinsm at gmail dot com
2008-07-22 14:17 ` [Bug math/5680] " mtk dot manpages at gmail dot com

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