1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gamil.com>
3 .\" Distributed under GPL
5 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
6 .\" all rights reserved.
7 .\" Translated Thu Jul 24 00:22:25 JST 2003
8 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .\"WORD: arc cosine 逆余弦
12 .\"WORD: arc tangent 逆正接
14 .\"WORD: imaginary part 虚部
16 .TH CATAN 3 2011-09-15 "" "Linux Programmer's Manual"
19 .\"O catan, catanf, catanl \- complex arc tangents
20 catan, catanf, catanl \- 複素数の逆正接 (arc tangent)
23 .B #include <complex.h>
25 .BI "double complex catan(double complex " z );
27 .BI "float complex catanf(float complex " z );
29 .BI "long double complex catanl(long double complex " z );
31 .\"O Link with \fI\-lm\fP.
37 .\"O function calculates the complex arc tangent of
39 .\"O If \fIy\ =\ catan(z)\fP, then \fIz\ =\ ctan(y)\fP.
40 .\"O The real part of y is chosen in the interval [\-pi/2,pi/2].
44 の逆正接 (arc tangent) を計算する。
45 \fIy = catan(z)\fP ならば、 \fIz = ctan(y)\fP が成立する。
47 の実部の値は区間 [\-pi/2,pi/2] から選択される。
53 catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i)
57 .\"O These functions first appeared in glibc in version 2.1.
58 これらの関数は glibc バージョン 2.1 で初めて登場した。
59 .\"O .SH "CONFORMING TO"
65 /* Link with "\-lm" */
73 main(int argc, char *argv[])
75 double complex z, c, f;
79 fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
83 z = atof(argv[1]) + atof(argv[2]) * I;
86 printf("catan() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
88 f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i);
89 printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));