expのヘルプ・マニュアル
日本語 英語
exp --help
man exp
EXP(3) Linux Programmer’s Manual EXP(3)
名前
exp, expf, expl - 底が e の指数関数
書式
#include
double exp(double x);
float expf(float x);
long double expl(long double x);
-lm でリンクする。
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
expf(), expl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
_ISOC99_SOURCE; or cc -std=c99
説明
exp() 関数は e の x 乗の値を返す (e は自然対数の底)。
返り値
成功すると、これらの関数は e の x 乗を返す。
x が NaN の場合、NaN が返される。
x が正の無限大の場合、正の無限大が返される。
x が負の無限大の場合、+0 が返される。
結果がアンダーフローする場合、範囲エラー (range error) が発生し、0 が返
される。
結 果 が オ ー バーフローする場合、範囲エラーが発生し、各関数はそれぞれ
+HUGE_VAL, +HUGE_VALF, +HUGE_VALL を返す。
エラー
これらの関数を呼び出した際にエラーが発生したかの判定方法についての情 報
は math_error(7) を参照のこと。
以下のエラーが発生する可能性がある。
範囲エラー (range error)、オーバーフローの場合
errno に ERANGE が 設定される。オーバーフロー浮動小数点例外
(FE_OVERFLOW) が上がる。
範囲エラー、アンダーフローの場合
errno に ERANGE が設定される。アンダーフロー浮 動 小 数 点 例 外
(FE_UNDERFLOW) が上がる。
準拠
C99, POSIX.1-2001. double 版の関数は SVr4, 4.3BSD, C89 にも準拠してい
る。
関連項目
cbrt(3), cexp(3), exp10(3), exp2(3), sqrt(3)
2008-08-05 EXP(3)
EXP(3) Linux Programmer’s Manual EXP(3)
NAME
exp, expf, expl - base-e exponential function
SYNOPSIS
#include
double exp(double x);
float expf(float x);
long double expl(long double x);
Link with -lm.
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
expf(), expl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
_ISOC99_SOURCE; or cc -std=c99
DESCRIPTION
The exp() function returns the value of e (the base of natural loga-
rithms) raised to the power of x.
RETURN VALUE
On success, these functions return the exponential value of x.
If x is a NaN, a NaN is returned.
If x is positive infinity, positive infinity is returned.
If x is negative infinity, +0 is returned.
If the result underflows, a range error occurs, and zero is returned.
If the result overflows, a range error occurs, and the functions return
+HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.
ERRORS
See math_error(7) for information on how to determine whether an error
has occurred when calling these functions.
The following errors can occur:
Range error, overflow
errno is set to ERANGE. An overflow floating-point exception
(FE_OVERFLOW) is raised.
Range error, underflow
errno is set to ERANGE. An underflow floating-point exception
(FE_UNDERFLOW) is raised.
CONFORMING TO
C99, POSIX.1-2001. The variant returning double also conforms to SVr4,
4.3BSD, C89.
SEE ALSO
cbrt(3), cexp(3), exp10(3), exp2(3), sqrt(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2008-08-05 EXP(3)