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>
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.
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.
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
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" References consulted:
26 .\" Linux libc source code
27 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
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)
34 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
35 .\" all rights reserved.
36 .\" Translated Wed Aug 6 00:35:20 JST 2003
37 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
38 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .TH LOG 3 2010-09-20 "" "Linux Programmer's Manual"
42 .\"O log, logf, logl \- natural logarithmic function
44 log, logf, logl \- 自然対数関数
50 .BI "double log(double " x );
52 .BI "float logf(float " x );
54 .BI "long double logl(long double " x );
57 .\"O Link with \fI\-lm\fP.
61 .\"O Feature Test Macro Requirements for glibc (see
62 .\"O .BR feature_test_macros (7)):
64 .RB ( feature_test_macros (7)
72 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
73 _POSIX_C_SOURCE\ >=\ 200112L;
83 .\"O function returns the natural logarithm of \fIx\fP.
88 .\"O On success, these functions return the natural logarithm of
97 .\"O a NaN is returned.
103 .\"O is 1, the result is +0.
109 .\"O is positive infinity,
110 .\"O positive infinity is returned.
112 が正の無限大の場合、正の無限大が返される。
117 .\"O then a pole error occurs, and the functions return
118 .\"O .RB - HUGE_VAL ,
119 .\"O .RB - HUGE_VALF ,
121 .\"O .RB - HUGE_VALL ,
124 が 0 の場合、極エラー (pole error) が発生し、
133 .\"O is negative (including negative infinity), then
134 .\"O a domain error occurs, and a NaN (not a number) is returned.
136 が負の場合 (負の無限大も含む)、領域エラー (domain error) が発生し、
137 NaN (not a number) が返される。
141 .\"O .BR math_error (7)
142 .\"O for information on how to determine whether an error has occurred
143 .\"O when calling these functions.
144 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
148 .\"O The following errors can occur:
151 .\"O Domain error: \fIx\fP is negative
152 領域エラー (domain error): \fIx\fP が負である
156 .\"O An invalid floating-point exception
157 .\"O .RB ( FE_INVALID )
167 .\"O Pole error: \fIx\fP is zero
168 極エラー (pole error): \fIx\fP が 0 である
172 .\"O A divide-by-zero floating-point exception
173 .\"O .RB ( FE_DIVBYZERO )
179 0 による除算 (divide-by-zero) 浮動小数点例外
182 .\"O .SH "CONFORMING TO"
185 .\"O The variant returning
187 .\"O also conforms to
188 .\"O SVr4, 4.3BSD, C89.
190 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
193 .\"O In glibc 2.5 and earlier,
196 .\"O of a NaN produces a bogus invalid floating-point
197 .\"O .RB ( FE_INVALID )