OSDN Git Service

266eb2b618054db281df76fb88346994b1b3c424
[linuxjm/LDP_man-pages.git] / draft / man3 / catan.3
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
4 .\"
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>
9 .\"
10 .\"WORD:        arc sine        逆正弦
11 .\"WORD:        arc cosine      逆余弦
12 .\"WORD:        arc tangent     逆正接
13 .\"WORD:        real part       実部
14 .\"WORD:        imaginary part  虚部
15 .\"
16 .TH CATAN 3 2011-09-15 "" "Linux Programmer's Manual"
17 .\"O .SH NAME
18 .SH 名前
19 .\"O catan, catanf, catanl \- complex arc tangents
20 catan, catanf, catanl \- 複素数の逆正接 (arc tangent)
21 .\"O .SH SYNOPSIS
22 .SH 書式
23 .B #include <complex.h>
24 .sp
25 .BI "double complex catan(double complex " z );
26 .br
27 .BI "float complex catanf(float complex " z );
28 .br
29 .BI "long double complex catanl(long double complex " z );
30 .sp
31 .\"O Link with \fI\-lm\fP.
32 \fI\-lm\fP でリンクする。
33 .\"O .SH DESCRIPTION
34 .SH 説明
35 .\"O The
36 .\"O .BR catan ()
37 .\"O function calculates the complex arc tangent of
38 .\"O .IR z .
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].
41 .BR catan ()
42 関数は複素数
43 .I z
44 の逆正接 (arc tangent) を計算する。
45 \fIy = catan(z)\fP ならば、 \fIz = ctan(y)\fP が成立する。
46 .I y
47 の実部の値は区間 [\-pi/2,pi/2] から選択される。
48 .LP
49 .\"O One has:
50 次の関係が成立する:
51 .nf
52
53     catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i)
54 .fi
55 .\"O .SH VERSIONS
56 .SH バージョン
57 .\"O These functions first appeared in glibc in version 2.1.
58 これらの関数は glibc バージョン 2.1 で初めて登場した。
59 .\"O .SH "CONFORMING TO"
60 .SH 準拠
61 C99.
62 .\"O .SH EXAMPLE
63 .SH 例
64 .nf
65 /* Link with "\-lm" */
66
67 #include <complex.h>
68 #include <stdlib.h>
69 #include <unistd.h>
70 #include <stdio.h>
71
72 int
73 main(int argc, char *argv[])
74 {
75     double complex z, c, f;
76     double complex i = I;
77
78     if (argc != 3) {
79         fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
80         exit(EXIT_FAILURE);
81     }
82
83     z = atof(argv[1]) + atof(argv[2]) * I;
84
85     c = catan(z);
86     printf("catan() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
87
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));
90
91     exit(EXIT_SUCCESS);
92 }
93 .fi
94 .\"O .SH "SEE ALSO"
95 .SH 関連項目
96 .BR ccos (3),
97 .BR clog (3),
98 .BR ctan (3),
99 .BR complex (7)