.\" 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 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI .\" all rights reserved. .\" Translated Wed Aug 6 00:35:20 JST 2003 .\" by Akihiro MOTOKI .\" Updated 2008-09-16, Akihiro MOTOKI .\" .TH LOG1P 3 2010-09-20 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O log1p, log1pf, log1pl \- logarithm of 1 plus argument log1p, log1pf, log1pl \- 引き数に 1 を加えた値の対数 .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "double log1p(double " x ); .br .BI "float log1pf(float " x ); .br .BI "long double log1pl(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 log1p (): .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 log1pf (), .BR log1pl (): .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 log1p(x) .\"O returns a value equivalent to .I log1p(x) は以下と等価な値を返す。 .nf log (1 + \fIx\fP) .fi .\"O It is computed in a way .\"O that is accurate even if the value of \fIx\fP is near zero. \fIx\fP の値が 0 に近い場合でも正確に計算できる方法が用いられる。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, these functions return the natural logarithm of .\"O .IR "(1\ +\ x)" . 成功すると、これらの関数は .I "(1\ +\ x)" の自然対数を返す。 .\"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 positive infinity, positive infinity is returned. .I x が正の無限大の場合、正の無限大が返される。 .\"O If .\"O .I x .\"O is \-1, a pole error occurs, .\"O and the functions return .\"O .RB - HUGE_VAL , .\"O .RB - HUGE_VALF , .\"O or .\"O .RB - HUGE_VALL , .\"O respectively. .I x が \-1 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ .RB - HUGE_VAL , .RB - HUGE_VALF , .RB - HUGE_VALL を返す。 .\"O If .\"O .I x .\"O is less than \-1 (including negative infinity), .\"O a domain error occurs, .\"O and a NaN (not a number) is returned. .I x が \-1 より小さい場合 (負の無限大も含む)、 領域エラー (domain error) が発生し、 NaN (not a number) が返される。 .\" POSIX.1 specifies a possible range error if x is subnormal .\" glibc 2.8 doesn't do this .\"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 Domain error: \fIx\fP is less than \-1 領域エラー (domain error): \fIx\fP が \-1 より小さい .\" .I errno .\" is set to .\" .BR EDOM . .\"O An invalid floating-point exception .\"O .RB ( FE_INVALID ) .\"O is raised. 不正 (invalid) 浮動小数点例外 .RB ( FE_INVALID ) が上がる。 .TP .\"O Pole error: \fIx\fP is \-1 極エラー (pole error): \fIx\fP が \-1 である .\" .I errno .\" is set to .\" .BR ERANGE . .\"O A divide-by-zero floating-point exception .\"O .RB ( FE_DIVBYZERO ) .\"O is raised. 0 による除算 (divide-by-zero) 浮動小数点例外 .RB ( FE_DIVBYZERO ) が上がる。 .PP .\"O These functions do not set .\"O .IR errno . これらの関数は .I errno を設定しない。 .\" FIXME . Is it intentional that these functions do not set errno? .\" log(), log2(), log10() do set errno .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6792 .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\" BSD .\"O .SH "SEE ALSO" .SH 関連項目 .BR exp (3), .BR expm1 (3), .BR log (3)