.\" Copyright 1995 Jim Van Zandt .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified 2002-07-27 Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved. .\" Translated Mon May 18 1998 by NAKANO Takeo .\" Update Tue Sep 23 2003 by Akihiro MOTOKI .\" Updated 2008-09-16, Akihiro MOTOKI .\" .TH EXPM1 3 2010-09-12 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O expm1, expm1f, expm1l \- exponential minus 1 expm1, expm1f, expm1l \- 引き数の指数から 1 を引いた値 .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "double expm1(double " x ); .br .BI "float expm1f(float " x ); .br .BI "long double expm1l(long double " x ); .sp .fi .\"O Link with \fI\-lm\fP. \fI\-lm\fP でリンクする。 .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR expm1 (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .br .BR expm1f (), .BR expm1l (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O .I expm1(x) .\"O returns a value equivalent to .BI expm1( x ) は以下と等しい値を返す。 .nf exp(x) \- 1 .fi .\"O It is .\"O computed in a way that is accurate even if the value of \fIx\fP is near .\"O zero\(ema case where .\"O .I "exp(x) \- 1" .\"O would be inaccurate due to .\"O subtraction of two numbers that are nearly equal. \fIx\fP が 0 に近く、 .I "exp(x) \- 1" が引き算時の桁落ちのために不正確となるような場合でも、 正確な値が計算できる方法が用いられる。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, these functions return .\"O .IR "exp(x)\ \-\ 1" . 成功すると、これらの関数は .I "exp(x)\ \-\ 1" を返す。 .\"O If .\"O .I x .\"O is a NaN, .\"O a NaN is returned. .I x が NaN の場合、NaN が返される。 .\"O If .\"O .I x .\"O is +0 (\-0), .\"O +0 (\-0) is returned. .I x が +0 (\-0) の場合、+0 (\-0) が返される。 .\"O If .\"O .I x .\"O is positive infinity, positive infinity is returned. .I x が正の無限大の場合、正の無限大が返される。 .\"O If .\"O .I x .\"O is negative infinity, \-1 is returned. .I x が負の無限大の場合、\-1 が返される。 .\"O If the result overflows, a range error occurs, .\"O and the functions return .\"O .RB - HUGE_VAL , .\"O .RB - HUGE_VALF , .\"O or .\"O .RB - HUGE_VALL , .\"O respectively. 結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ .RB - HUGE_VAL , .RB - HUGE_VALF , .RB - HUGE_VALL を返す。 .\"O .SH ERRORS .SH エラー .\"O See .\"O .BR math_error (7) .\"O for information on how to determine whether an error has occurred .\"O when calling these functions. これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は .BR math_error (7) を参照のこと。 .PP .\"O The following errors can occur: 以下のエラーが発生する可能性がある。 .TP .\"O Range error, overflow 範囲エラー (range error)、オーバーフローの場合 .\"O .I errno .\"O is set to .\"O .BR ERANGE .\"O (but see BUGS). .\"O An overflow floating-point exception .\"O .RB ( FE_OVERFLOW ) .\"O is raised. .I errno に .B ERANGE が設定される (「バグ」の節も参照)。 オーバーフロー浮動小数点例外 .RB ( FE_OVERFLOW ) が上がる。 .PP .\" .\" POSIX.1 specifies an optional range error (underflow) if .\" x is subnormal. Glibc does not implement this. .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\" BSD. .\"O .SH BUGS .SH バグ .\"O For some large negative .\"O .I x .\"O values (where the function result approaches \-1), .\"O .BR expm1 () .\"O raises a bogus underflow floating-point exception. .I x が負の大きな値の場合 (この場合には関数の結果は \-1 に近付いていく)、 .BR expm1 () は間違ってアンダーフロー浮動小数点例外を上げることがある。 .\" FIXME . .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6778 .\"O For some large positive .\"O .I x .\"O values, .\"O .BR expm1 () .\"O raises a bogus invalid floating-point exception in addition to the expected .\"O overflow exception, and returns a NaN instead of positive infinity. .I x が正の大きな値の場合、 .BR expm1 () は期待通りのオーバーフロー例外だけでなく 間違って不正 (invalid) 浮動小数点例外を上げ、 正の無限大ではなく NaN を返すことがある。 .\" FIXME . .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6814 .\" e.g., expm1(1e5) through expm1(1.00199970127e5), .\" but not expm1(1.00199970128e5) and beyond. .\"O Before version 2.11, .\" It looks like the fix was in 2.11, or possibly 2.12. .\" I have no test system for 2.11, but 2.12 passes. .\" From the source (sysdeps/i386/fpu/s_expm1.S) it looks .\" like the changes were in 2.11. .\"O the glibc implementation did not set .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6788 .\"O .I errno .\"O to .\"O .B ERANGE .\"O when a range error occurred. バージョン 2.11 より前の glibc の実装では、 範囲エラーが発生した場合に、 .I errno に .B ERANGE が設定されなかった。 .\"O+ \"O .SH "SEE ALSO" .SH 関連項目 .BR exp (3), .BR log (3), .BR log1p (3)