OSDN Git Service

418b39ffde6840bb13890d03b7433e20984d6fc9
[linuxjm/LDP_man-pages.git] / release / man3 / exp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
31 .\" Modified 2002-07-27 by Walter Harms
32 .\"     (walter.harms@informatik.uni-oldenburg.de)
33 .\"
34 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
35 .\"         all rights reserved.
36 .\" Translated Mon Sep  7 23:27:52 JST 2003
37 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
38 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\"
40 .TH EXP 3  2010-09-20  "" "Linux Programmer's Manual"
41 .SH 名前
42 exp, expf, expl \- 底が e の指数関数
43 .SH 書式
44 .nf
45 .B #include <math.h>
46 .sp
47 .BI "double exp(double " x );
48 .br
49 .BI "float expf(float " x );
50 .br
51 .BI "long double expl(long double " x );
52 .fi
53 .sp
54 \fI\-lm\fP でリンクする。
55 .sp
56 .in -4n
57 glibc 向けの機能検査マクロの要件
58 .RB ( feature_test_macros (7)
59 参照):
60 .in
61 .sp
62 .ad l
63 .BR expf (),
64 .BR expl ():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 or
70 .I cc\ -std=c99
71 .RE
72 .ad b
73 .SH 説明
74 .BR exp ()
75 関数は e の \fIx\fP 乗の値を返す
76 (e は自然対数の底)。
77 .SH 返り値
78 成功すると、これらの関数は e の
79 .I x
80 乗を返す。
81
82 .I x
83 が NaN の場合、NaN が返される。
84
85 .I x
86 が正の無限大の場合、正の無限大が返される。
87
88 .I x
89 が負の無限大の場合、+0 が返される。
90
91 結果がアンダーフローする場合、
92 範囲エラー (range error) が発生し、0 が返される。
93
94 結果がオーバーフローする場合、範囲エラーが発生し、
95 各関数はそれぞれ
96 .RB + HUGE_VAL ,
97 .RB + HUGE_VALF ,
98 .RB + HUGE_VALL
99 を返す。
100 .SH エラー
101 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
102 .BR math_error (7)
103 を参照のこと。
104
105 以下のエラーが発生する可能性がある。
106 .TP
107 範囲エラー (range error)、オーバーフローの場合
108 .I errno
109
110 .B ERANGE
111 が設定される。
112 オーバーフロー浮動小数点例外
113 .RB ( FE_OVERFLOW )
114 が上がる。
115 .TP
116 範囲エラー、アンダーフローの場合
117 .I errno
118
119 .B ERANGE
120 が設定される。
121 アンダーフロー浮動小数点例外
122 .RB ( FE_UNDERFLOW )
123 が上がる。
124 .SH 準拠
125 C99, POSIX.1-2001.
126 .I double
127 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
128 .SH 関連項目
129 .BR cbrt (3),
130 .BR cexp (3),
131 .BR exp10 (3),
132 .BR exp2 (3),
133 .BR sqrt (3)