OSDN Git Service

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