Bug 6759 - atanh() gives wrong errno on pole error
Summary: atanh() gives wrong errno on pole error
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-22 14:23 UTC by Michael Kerrisk
Modified: 2014-07-04 05:48 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kerrisk 2008-07-22 14:23:16 UTC
According to POSIX.1, when atanh(1.0) or atanh(-1.0) produces a pole error,
errno should be set to ERANGE.  However, glibc (2.8, SUSE 11.0) gives EDOM in
this case.

I guess the fix is to change the appropriate line for atanh()'s _POSIX_ behavior
in sysdeps/ieee754/k_standard.c?
Comment 1 Jan Kratochvil 2010-05-03 09:09:59 UTC
It seems to be fixed since glibc-2.10,
verified by: Ivana Varekova <varekova@redhat.com>

commit 49768bb93e4960a814563ee30213eaf36e6dcb48
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Mon Apr 27 04:01:16 2009 +0000

2009-04-26  Ulrich Drepper  <drepper@redhat.com>

        * sysdeps/ieee754/k_standard.c (__kernel_standard): Pole errors in
        atanh should set ERANGE.

sysdeps/ieee754/k_standard.c
-                  __set_errno (EDOM);
+                  __set_errno (ERANGE);
Comment 2 Jan Kratochvil 2010-05-03 09:10:25 UTC
Found as fixed.
Comment 3 Michael Kerrisk 2010-09-11 06:49:08 UTC
man page will be updated in man-pages-2.37