OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[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 .\"
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" Distributed under GPL
6 .\" %%%LICENSE_END
7 .\"
8 .\"*******************************************************************
9 .\"
10 .\" This file was generated with po4a. Translate the source file.
11 .\"
12 .\"*******************************************************************
13 .\"
14 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
15 .\"         all rights reserved.
16 .\" Translated Thu Jul 24 00:22:25 JST 2003
17 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
18 .\"
19 .TH CATAN 3 2011\-09\-15 "" "Linux Programmer's Manual"
20 .SH 名前
21 catan, catanf, catanl \- 複素数の逆正接 (arc tangent)
22 .SH 書式
23 \fB#include <complex.h>\fP
24 .sp
25 \fBdouble complex catan(double complex \fP\fIz\fP\fB);\fP
26 .br
27 \fBfloat complex catanf(float complex \fP\fIz\fP\fB);\fP
28 .br
29 \fBlong double complex catanl(long double complex \fP\fIz\fP\fB);\fP
30 .sp
31 \fI\-lm\fP でリンクする。
32 .SH 説明
33 \fBcatan\fP() 関数は複素数 \fIz\fP の逆正接 (arc tangent) を計算する。
34 \fIy = catan(z)\fP ならば、 \fIz = ctan(y)\fP が成立する。
35 \fIy\fP の実部の値は区間 [\-pi/2,pi/2] から選択される。
36 .LP
37 次の関係が成立する:
38 .nf
39
40     catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i)
41 .fi
42 .SH バージョン
43 これらの関数は glibc バージョン 2.1 で初めて登場した。
44 .SH 準拠
45 C99.
46 .SH 例
47 .nf
48 /* "\-lm" でリンクする */
49
50 #include <complex.h>
51 #include <stdlib.h>
52 #include <unistd.h>
53 #include <stdio.h>
54
55 int
56 main(int argc, char *argv[])
57 {
58     double complex z, c, f;
59     double complex i = I;
60
61     if (argc != 3) {
62         fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
63         exit(EXIT_FAILURE);
64     }
65
66     z = atof(argv[1]) + atof(argv[2]) * I;
67
68     c = catan(z);
69     printf("catan() = %6.3f %6.3f*i\en", creal(c), cimag(c));
70
71     f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i);
72     printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
73
74     exit(EXIT_SUCCESS);
75 }
76 .fi
77 .SH 関連項目
78 \fBccos\fP(3), \fBclog\fP(3), \fBctan\fP(3), \fBcomplex\fP(7)
79 .SH この文書について
80 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
81 である。プロジェクトの説明とバグ報告に関する情報は
82 http://www.kernel.org/doc/man\-pages/ に書かれている。