OSDN Git Service

(split) LDP: Move mdoc.samples.7 from contrib to release.
[linuxjm/LDP_man-pages.git] / release / man3 / cacosh.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 .\"*******************************************************************
6 .\"
7 .\" This file was generated with po4a. Translate the source file.
8 .\"
9 .\"*******************************************************************
10 .TH CACOSH 3 2011\-09\-15 "" "Linux Programmer's Manual"
11 .SH 名前
12 cacosh, cacoshf, cacoshl \- 複素数の逆双曲線余弦 (arc hyperbolic cosine)
13 .SH 書式
14 \fB#include <complex.h>\fP
15 .sp
16 \fBdouble complex cacosh(double complex \fP\fIz\fP\fB);\fP
17 .br
18 \fBfloat complex cacoshf(float complex \fP\fIz\fP\fB);\fP
19 .br
20 \fBlong double complex cacoshl(long double complex \fP\fIz\fP\fB);\fP
21 .sp
22 \fI\-lm\fP でリンクする。
23 .SH 説明
24 \fBcacosh\fP()  関数は複素数 \fIz\fP の逆双曲線余弦 (arc hyperbolic cosine) を計算する。 \fIy\ =\ cacosh(z)\fP ならば、 \fIz\ =\ ccosh(y)\fP が成立する。 \fIy\fP の虚部の値は区間 [\-pi,pi] から選択され、 \fIy\fP
25 の実部の値は非負の値が選択される。
26 .LP
27 次の関係が成立する:
28 .nf
29
30     cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2))
31 .fi
32 .SH バージョン
33 これらの関数は glibc バージョン 2.1 で初めて登場した。
34 .SH 準拠
35 C99.
36 .SH 例
37 .nf
38 /* "\-lm" でリンクする */
39
40 #include <complex.h>
41 #include <stdlib.h>
42 #include <unistd.h>
43 #include <stdio.h>
44
45 int
46 main(int argc, char *argv[])
47 {
48     double complex z, c, f;
49
50     if (argc != 3) {
51         fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
52         exit(EXIT_FAILURE);
53     }
54
55     z = atof(argv[1]) + atof(argv[2]) * I;
56
57     c = cacosh(z);
58     printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
59
60     f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
61     printf("formula  = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
62
63     exit(EXIT_SUCCESS);
64 }
65 .fi
66 .SH 関連項目
67 \fBacosh\fP(3), \fBcabs\fP(3), \fBccosh\fP(3), \fBcimag\fP(3), \fBcomplex\fP(7)
68 .SH この文書について
69 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
70 である。プロジェクトの説明とバグ報告に関する情報は
71 http://www.kernel.org/doc/man\-pages/ に書かれている。