Re: Recently, the atanh implementation was changed, but the man seems not changed yet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Motohiro,

On Thu, Feb 18, 2010 at 5:19 AM, KOSAKI Motohiro
<kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
> Hi Michael,
>
> I recently found little mismatch between the impmentation and the man in
> atanh function.
>
> current man page says
> http://www.kernel.org/doc/man-pages/online/pages/man3/atanh.3.html
>
> ---------------------------------------------------------
> BUGS
>       For a pole error, errno is set to EDOM; POSIX.1 says it should be set to
>       ERANGE.
> ---------------------------------------------------------
>
> but following test programs "34: Numerical result out of range".
> It mean atanh return ERANGE rightly.
>
>
> atanh_test.c
> ---------------------------------------------------------
> #include <math.h>
> #include <stdio.h>
> #include <sys/errno.h>
> #include <string.h>
>
> int main(void)
> {
>        double d;
>
>        d = atanh(1.0);
>        if (d == HUGE_VAL)
>                printf("huge %d: %s\n", errno, strerror(errno));
>        else
>                printf("Oops no error\n");
>
>        return 0;
> }
> ---------------------------------------------------------
>
>
> I dug in glibc's ChangeLog and I found following change.
> So, can we consider to change the man too?
>
>
> ---------------------------------------------------------
> 2009-04-26  Ulrich Drepper  <drepper@xxxxxxxxxx>
>
>        * sysdeps/ieee754/dbl-64/s_expm1.c: Set errno for overflow.
>        * sysdeps/ieee754/flt-32/s_expm1f.c: Likewise.
>        * sysdeps/x86_64/fpu/s_expm1l.S: Likewise.
>
>        * sysdeps/ieee754/k_standard.c (__kernel_standard): Pole errors in
>        atanh should set ERANGE.

Thanks for your detailed report. I applied the following change for
man-pages-2.37.

Cheers,

Michael


--- a/man3/atanh.3
+++ b/man3/atanh.3
@@ -129,16 +129,16 @@ The variant returning
 also conforms to
 SVr4, 4.3BSD, C89.
 .SH BUGS
-For a pole error,
-.\"
-.\" FIXME . this is as at glibc 2.8; check later if this bug is fixed
+In glibc 2.9 and earlier,
+.\" Bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759
 .\" This can be seen in sysdeps/ieee754/k_standard.c
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759
+when a pole error occurs,
 .I errno
-is set to
-.BR EDOM ;
-POSIX.1 says it should be set to
+as set to
+.BR EDOM
+instead of the POSIX-mandated
 .BR ERANGE .
+Since version 2.10, glibc does the right thing.
 .SH "SEE ALSO"
 .BR acosh (3),
 .BR asinh (3),




-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux