OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / log.3
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>
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 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
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)
33 .\"
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>
39 .\"
40 .TH LOG 3  2010-09-20  "" "Linux Programmer's Manual"
41 .SH Ì¾Á°
42 log, logf, logl \- ¼«Á³Âпô´Ø¿ô
43 .SH ½ñ¼°
44 .nf
45 .B #include <math.h>
46 .sp
47 .BI "double log(double " x );
48 .br
49 .BI "float logf(float " x );
50 .br
51 .BI "long double logl(long double " x );
52 .fi
53 .sp
54 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
55 .sp
56 .in -4n
57 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
58 .RB ( feature_test_macros (7)
59 »²¾È):
60 .in
61 .sp
62 .ad l
63 .BR logf (),
64 .BR logl ():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 or
70 .I cc\ -std=c99
71 .RE
72 .ad
73 .SH ÀâÌÀ
74 .BR log ()
75 ´Ø¿ô¤Ï \fIx\fP ¤Î¼«Á³Âпô¤òÊÖ¤¹¡£
76 .SH ÊÖ¤êÃÍ
77 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
78 .I x
79 ¤Î¼«Á³Âпô¤òÊÖ¤¹¡£
80
81 .I x
82 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
83
84 .I x
85 ¤¬ 1 ¤Î¾ì¹ç¡¢+0 ¤¬ÊÖ¤µ¤ì¤ë¡£
86
87 .I x
88 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
89
90 .I x
91 ¤¬ 0 ¤Î¾ì¹ç¡¢¶Ë¥¨¥é¡¼ (pole error) ¤¬È¯À¸¤·¡¢
92 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
93 .RB - HUGE_VAL ,
94 .RB - HUGE_VALF ,
95 .RB - HUGE_VALL
96 ¤òÊÖ¤¹¡£
97
98 .I x
99 ¤¬Éé¤Î¾ì¹ç (Éé¤Î̵¸ÂÂç¤â´Þ¤à)¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
100 NaN (not a number) ¤¬ÊÖ¤µ¤ì¤ë¡£
101 .SH ¥¨¥é¡¼
102 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
103 .BR math_error (7)
104 ¤ò»²¾È¤Î¤³¤È¡£
105 .PP
106 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
107 .TP
108 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬Éé¤Ç¤¢¤ë
109 .I errno
110 ¤Ë
111 .B EDOM
112 ¤¬ÀßÄꤵ¤ì¤ë¡£
113 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
114 .RB ( FE_INVALID )
115 ¤¬¾å¤¬¤ë¡£
116 .TP
117 ¶Ë¥¨¥é¡¼ (pole error): \fIx\fP ¤¬ 0 ¤Ç¤¢¤ë
118 .I errno
119 ¤Ë
120 .B ERANGE
121 ¤¬ÀßÄꤵ¤ì¤ë¡£
122 0 ¤Ë¤è¤ë½ü»» (divide-by-zero) ÉâÆ°¾®¿ôÅÀÎã³°
123 .RB ( FE_DIVBYZERO )
124 ¤¬¾å¤¬¤ë¡£
125 .SH ½àµò
126 C99, POSIX.1-2001.
127 .I double
128 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
129 .SH ¥Ð¥°
130 glibc 2.5 °ÊÁ°¤Ç¤Ï¡¢
131 NaN ¤ËÂФ·¤Æ
132 .BR log ()
133 ¤ò¤È¤ë¤È¡¢´Ö°ã¤Ã¤ÆÉÔÀµÉâÆ°¾®¿ôÅÀÎã³°
134 .RB ( FE_INVALID )
135 ¤¬È¯À¸¤·¤Æ¤¤¤¿¡£
136 .SH ´ØÏ¢¹àÌÜ
137 .BR cbrt (3),
138 .BR clog (3),
139 .BR log2 (3),
140 .BR log10 (3),
141 .BR log1p (3),
142 .BR sqrt (3)