OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / log2.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) 2004-2005 Yuichi SATO
35 .\"         all rights reserved.
36 .\" Translated 2004-08-20, Yuichi SATO <ysato444@yahoo.co.jp>
37 .\" Updated & Modified 2005-01-16, Yuichi SATO
38 .\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH LOG2 3  2010-09-12  "" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .SH Ì¾Á°
44 .\"O log2, log2f, log2l \- base-2 logarithmic function
45 log2, log2f, log2l \- Ä줬 2 ¤ÎÂпô´Ø¿ô
46 .\"O .SH SYNOPSIS
47 .SH ½ñ¼°
48 .nf
49 .B #include <math.h>
50 .sp
51 .BI "double log2(double " x );
52 .br
53 .BI "float log2f(float " x );
54 .br
55 .BI "long double log2l(long double " x );
56 .fi
57 .sp
58 .\"O Link with \fI\-lm\fP.
59 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
60 .sp
61 .in -4n
62 .\"O Feature Test Macro Requirements for glibc (see
63 .\"O .BR feature_test_macros (7)):
64 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
65 .RB ( feature_test_macros (7)
66 »²¾È):
67 .in
68 .sp
69 .ad l
70 .BR log2 (),
71 .BR log2f (),
72 .BR log2l ():
73 .RS 4
74 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
75 .br
76 or
77 .I cc\ -std=c99
78 .RE
79 .ad b
80 .\"O .SH DESCRIPTION
81 .SH ÀâÌÀ
82 .\"O The
83 .\"O .BR log2 ()
84 .\"O function returns the base 2 logarithm of \fIx\fP.
85 .BR log2 ()
86 ´Ø¿ô¤ÏÄì¤ò 2 ¤È¤¹¤ë \fIx\fP ¤ÎÂпô¤òÊÖ¤¹¡£
87 .\"O .SH RETURN VALUE
88 .SH ÊÖ¤êÃÍ
89 .\"O On success, these functions return the base 2 logarithm of
90 .\"O .IR x .
91 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
92 .I x
93 ¤ÎÄì¤ò 2 ¤È¤¹¤ëÂпô¤òÊÖ¤¹¡£
94
95 .\"O For special cases, including where
96 .\"O .I x
97 .\"O is 0, 1, negative, infinity, or NaN, see
98 .\"O .BR log (3).
99 .I x
100 ¤¬ 0¡¢1¡¢É顢̵¸ÂÂç¡¢NaN ¤Ê¤É¤Î¤µ¤Þ¤¶¤Þ¤ÊÆÃÊ̤ʾõ¶·¤Ë¤Ä¤¤¤Æ¤Ï¡¢
101 .BR log (3)
102 ¤ò»²¾È¤Î¤³¤È¡£
103 .\"O .SH ERRORS
104 .SH ¥¨¥é¡¼
105 .\"O See
106 .\"O .BR math_error (7)
107 .\"O for information on how to determine whether an error has occurred
108 .\"O when calling these functions.
109 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
110 .BR math_error (7)
111 ¤ò»²¾È¤Î¤³¤È¡£
112
113 .\"O For a discussion of the errors that can occur for these functions, see
114 .\"O .BR log (3).
115 ¤³¤ì¤é¤Î´Ø¿ô¤ÇȯÀ¸¤¹¤ë¥¨¥é¡¼¤Ë¤Ä¤¤¤Æ¤Ï¡¢
116 .BR log (3)
117 ¤ò»²¾È¤Î¤³¤È¡£
118 .\"O .SH VERSIONS
119 .SH ¥Ð¡¼¥¸¥ç¥ó
120 .\"O These functions first appeared in glibc in version 2.1.
121 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
122 .\"O .SH "CONFORMING TO"
123 .SH ½àµò
124 C99, POSIX.1-2001.
125 .\"O The variant returning
126 .\"O .I double
127 .\"O also conforms to
128 .\"O SVr4, 4.3BSD.
129 .I double
130 ÈǤδؿô¤Ï SVr4, 4.3BSD ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
131 .\"O .SH "SEE ALSO"
132 .SH ´ØÏ¢¹àÌÜ
133 .BR cbrt (3),
134 .BR clog2 (3),
135 .BR log (3),
136 .BR log10 (3),
137 .BR sqrt (3)