OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / man3 / log1p.3
1 .\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
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 .\" Modified 2002-07-27 by Walter Harms
26 .\"     (walter.harms@informatik.uni-oldenburg.de)
27 .\"
28 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
29 .\"         all rights reserved.
30 .\" Translated Wed Aug  6 00:35:20 JST 2003
31 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
33 .\"
34 .TH LOG1P 3   2010-09-20 "" "Linux Programmer's Manual"
35 .SH 名前
36 log1p, log1pf, log1pl \-  引き数に 1 を加えた値の対数
37 .SH 書式
38 .nf
39 .B #include <math.h>
40 .sp
41 .BI "double log1p(double " x );
42 .br
43 .BI "float log1pf(float " x );
44 .br
45 .BI "long double log1pl(long double " x );
46 .sp
47 .fi
48 \fI\-lm\fP でリンクする。
49 .sp
50 .in -4n
51 glibc 向けの機能検査マクロの要件
52 .RB ( feature_test_macros (7)
53 参照):
54 .in
55 .sp
56 .ad l
57 .BR log1p ():
58 .RS 4
59 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
60 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE ||
61 _POSIX_C_SOURCE\ >=\ 200112L;
62 .br
63 or
64 .I cc\ -std=c99
65 .RE
66 .br
67 .BR log1pf (),
68 .BR log1pl ():
69 .RS 4
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
71 _POSIX_C_SOURCE\ >=\ 200112L;
72 .br
73 or
74 .I cc\ -std=c99
75 .RE
76 .ad b
77 .SH 説明
78 .I log1p(x)
79 は以下と等価な値を返す。
80 .nf
81
82     log (1 + \fIx\fP)
83
84 .fi
85 \fIx\fP の値が 0 に近い場合でも正確に計算できる方法が用いられる。
86 .SH 返り値
87 成功すると、これらの関数は
88 .I "(1\ +\ x)"
89 の自然対数を返す。
90
91 .I x
92 が NaN の場合、NaN が返される。
93
94 .I x
95 が正の無限大の場合、正の無限大が返される。
96
97 .I x
98 が \-1 の場合、極エラー (pole error) が発生し、
99 各関数はそれぞれ
100 .RB - HUGE_VAL ,
101 .RB - HUGE_VALF ,
102 .RB - HUGE_VALL
103 を返す。
104
105 .I x
106 が \-1 より小さい場合 (負の無限大も含む)、
107 領域エラー (domain error) が発生し、
108 NaN (not a number) が返される。
109 .\" POSIX.1 specifies a possible range error if x is subnormal
110 .\" glibc 2.8 doesn't do this
111 .SH エラー
112 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
113 .BR math_error (7)
114 を参照のこと。
115 .PP
116 以下のエラーが発生する可能性がある。
117 .TP
118 領域エラー (domain error): \fIx\fP が \-1 より小さい
119 .\" .I errno
120 .\" is set to
121 .\" .BR EDOM .
122 不正 (invalid) 浮動小数点例外
123 .RB ( FE_INVALID )
124 が上がる。
125 .TP
126 極エラー (pole error): \fIx\fP が \-1 である
127 .\" .I errno
128 .\" is set to
129 .\" .BR ERANGE .
130 0 による除算 (divide-by-zero) 浮動小数点例外
131 .RB ( FE_DIVBYZERO )
132 が上がる。
133 .PP
134 これらの関数は
135 .I errno
136 を設定しない。
137 .\" FIXME . Is it intentional that these functions do not set errno?
138 .\" log(), log2(), log10() do set errno
139 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6792
140 .SH 準拠
141 C99, POSIX.1-2001.
142 .\" BSD
143 .SH 関連項目
144 .BR exp (3),
145 .BR expm1 (3),
146 .BR log (3)