* Recently, the atanh implementation was changed, but the man seems not changed yet @ 2010-02-18 3:19 KOSAKI Motohiro [not found] ` <20100218115807.733E.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: KOSAKI Motohiro @ 2010-02-18 3:19 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Cc: kosaki.motohiro-+CUm20s59erQFUHtdCDX3A, linux-man-u79uwXL29TY76Z2rM5mHXA 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> * 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. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20100218115807.733E.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>]
* Re: Recently, the atanh implementation was changed, but the man seems not changed yet [not found] ` <20100218115807.733E.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org> @ 2010-09-11 6:52 ` Michael Kerrisk [not found] ` <AANLkTimrtXabyGQp6G+8NOeDr3+G_PcpCUPB1YnFv8Ed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Michael Kerrisk @ 2010-09-11 6:52 UTC (permalink / raw) To: KOSAKI Motohiro; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Hello Motohiro, On Thu, Feb 18, 2010 at 5:19 AM, KOSAKI Motohiro <kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > * 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <AANLkTimrtXabyGQp6G+8NOeDr3+G_PcpCUPB1YnFv8Ed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Recently, the atanh implementation was changed, but the man seems not changed yet [not found] ` <AANLkTimrtXabyGQp6G+8NOeDr3+G_PcpCUPB1YnFv8Ed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-09-14 1:14 ` KOSAKI Motohiro 0 siblings, 0 replies; 3+ messages in thread From: KOSAKI Motohiro @ 2010-09-14 1:14 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Cc: kosaki.motohiro-+CUm20s59erQFUHtdCDX3A, linux-man-u79uwXL29TY76Z2rM5mHXA > > --------------------------------------------------------- > > 2009-04-26 Ulrich Drepper <drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > > > * 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. > > --- 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), Great! This looks goo to me :) Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-14 1:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-02-18 3:19 Recently, the atanh implementation was changed, but the man seems not changed yet KOSAKI Motohiro [not found] ` <20100218115807.733E.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org> 2010-09-11 6:52 ` Michael Kerrisk [not found] ` <AANLkTimrtXabyGQp6G+8NOeDr3+G_PcpCUPB1YnFv8Ed-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2010-09-14 1:14 ` KOSAKI Motohiro
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.