2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright 2002 Walter Harms(walter.harms@informatik.uni-oldenburg.de)
|
|
|
|
.\" Distributed under GPL
|
|
|
|
.\"
|
cacos.3, cacosh.3, catan.3, catanh.3: Fix formula describing function
The man pages for cacos(), cacosh(), catan(), catanh()
contain incorrect formulae describing the functions.
As reported by Richard B. Kreckel:
cacos, cacosf, cacosl:
The formula given in the man page
cacos(z) = -i clog(z + csqrt(z * z - 1))
gives wrong results in second and fourth quadrant of
complex plain.
The formula
cacos(z) = -i clog(z + I*csqrt(1 - z * z))
gives correct results.
catan, catanf, catanl:
The formula given in the man page
catan(z) = 1 / 2i clog((1 + iz) / (1 - iz))
gives wrong results on the negative imaginary axis beginning
at -I (along one of the two branch cuts). Besides, the formula
is written in an ambiguous way.
The formula
catan(z) = (clog(1 + iz) - clog(1 - iz)) / 2i
gives correct results.
cacosh, cacoshf, cacoshl:
The formula given in the man page
cacosh(z) = (0.5) * clog((1 + z) / (1 - z))
gives wrong results everywhere in the complex plain.
(The formula seems to be copied from the one for catanh,
where it is sometimes correct.)
The formula
cacosh(z) = 2 * clog(csqrt((z + 1)/2) + csqrt((z - 1)/2))
gives correct results.
catanh, catanhf, catanhl:
The formula given in the man page
catanh(z) = 0.5 * clog((1 + z) / (1 - z))
gives wrong results on the positive real axis beginning at 1
(along one of the two branch cuts).
The formula
catanh(z) = 0.5 * (clog(1 + z) - clog(1 - z))
gives correct results.
I've also checked casin, casinf, casinl, casinh, casinhf, and
casinhl and the formulae given there
casin(z) = -i clog(iz + csqrt(1 - z * z))
casinh(z) = clog(z + csqrt(z * z + 1))
are actually correct.
Reported-by: Richard B. Kreckel <kreckel@ginac.de>
Reviewed-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-09-15 10:35:56 +00:00
|
|
|
.TH CACOSH 3 2011-09-15 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <complex.h>
|
|
|
|
.sp
|
2007-04-12 22:42:49 +00:00
|
|
|
.BI "double complex cacosh(double complex " z );
|
2004-11-11 17:28:42 +00:00
|
|
|
.br
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "float complex cacoshf(float complex " z );
|
2004-11-11 17:28:42 +00:00
|
|
|
.br
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "long double complex cacoshl(long double complex " z );
|
|
|
|
.sp
|
2007-07-21 05:25:03 +00:00
|
|
|
Link with \fI\-lm\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
2007-04-12 22:42:49 +00:00
|
|
|
The
|
2005-10-19 14:48:35 +00:00
|
|
|
.BR cacosh ()
|
2008-03-11 12:39:31 +00:00
|
|
|
function calculates the complex arc hyperpolic cosine of
|
2007-12-24 11:42:27 +00:00
|
|
|
.IR z .
|
|
|
|
If \fIy\ =\ cacosh(z)\fP, then \fIz\ =\ ccosh(y)\fP.
|
|
|
|
The imaginary part of
|
|
|
|
.I y
|
|
|
|
is chosen in the interval [\-pi,pi].
|
|
|
|
The real part of
|
|
|
|
.I y
|
_syscall.2, accept.2, epoll_create.2, inotify_add_watch.2, ioctl.2, msgget.2, msgop.2, open.2, prctl.2, sched_setscheduler.2, semctl.2, semget.2, swapon.2, addseverity.3, cacosh.3, csqrt.3, dirfd.3, drand48.3, fputws.3, mq_send.3, posix_openpt.3, puts.3, sched_getcpu.3, shm_open.3, sqrt.3, sysconf.3, tgamma.3, ulimit.3, credentials.7, svipc.7: Global fix: s/non-negative/nonnegative/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:44:48 +00:00
|
|
|
is chosen nonnegative.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2007-05-01 08:15:41 +00:00
|
|
|
One has:
|
2007-12-24 11:42:27 +00:00
|
|
|
.nf
|
|
|
|
|
cacos.3, cacosh.3, catan.3, catanh.3: Fix formula describing function
The man pages for cacos(), cacosh(), catan(), catanh()
contain incorrect formulae describing the functions.
As reported by Richard B. Kreckel:
cacos, cacosf, cacosl:
The formula given in the man page
cacos(z) = -i clog(z + csqrt(z * z - 1))
gives wrong results in second and fourth quadrant of
complex plain.
The formula
cacos(z) = -i clog(z + I*csqrt(1 - z * z))
gives correct results.
catan, catanf, catanl:
The formula given in the man page
catan(z) = 1 / 2i clog((1 + iz) / (1 - iz))
gives wrong results on the negative imaginary axis beginning
at -I (along one of the two branch cuts). Besides, the formula
is written in an ambiguous way.
The formula
catan(z) = (clog(1 + iz) - clog(1 - iz)) / 2i
gives correct results.
cacosh, cacoshf, cacoshl:
The formula given in the man page
cacosh(z) = (0.5) * clog((1 + z) / (1 - z))
gives wrong results everywhere in the complex plain.
(The formula seems to be copied from the one for catanh,
where it is sometimes correct.)
The formula
cacosh(z) = 2 * clog(csqrt((z + 1)/2) + csqrt((z - 1)/2))
gives correct results.
catanh, catanhf, catanhl:
The formula given in the man page
catanh(z) = 0.5 * clog((1 + z) / (1 - z))
gives wrong results on the positive real axis beginning at 1
(along one of the two branch cuts).
The formula
catanh(z) = 0.5 * (clog(1 + z) - clog(1 - z))
gives correct results.
I've also checked casin, casinf, casinl, casinh, casinhf, and
casinhl and the formulae given there
casin(z) = -i clog(iz + csqrt(1 - z * z))
casinh(z) = clog(z + csqrt(z * z + 1))
are actually correct.
Reported-by: Richard B. Kreckel <kreckel@ginac.de>
Reviewed-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-09-15 10:35:56 +00:00
|
|
|
cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2))
|
2007-12-24 11:42:27 +00:00
|
|
|
.fi
|
2008-08-11 17:13:47 +00:00
|
|
|
.SH VERSIONS
|
|
|
|
These functions first appeared in glibc in version 2.1.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "CONFORMING TO"
|
2008-07-15 13:39:17 +00:00
|
|
|
C99.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR acosh (3),
|
|
|
|
.BR cabs (3),
|
|
|
|
.BR cimag (3),
|
2006-04-21 01:24:06 +00:00
|
|
|
.BR complex (7)
|