OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / release / 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 .SH 名前
43 log2, log2f, log2l \- 底が 2 の対数関数
44 .SH 書式
45 .nf
46 .B #include <math.h>
47 .sp
48 .BI "double log2(double " x );
49 .br
50 .BI "float log2f(float " x );
51 .br
52 .BI "long double log2l(long double " x );
53 .fi
54 .sp
55 \fI\-lm\fP でリンクする。
56 .sp
57 .in -4n
58 glibc 向けの機能検査マクロの要件
59 .RB ( feature_test_macros (7)
60 参照):
61 .in
62 .sp
63 .ad l
64 .BR log2 (),
65 .BR log2f (),
66 .BR log2l ():
67 .RS 4
68 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
69 .br
70 or
71 .I cc\ -std=c99
72 .RE
73 .ad b
74 .SH 説明
75 .BR log2 ()
76 関数は底を 2 とする \fIx\fP の対数を返す。
77 .SH 返り値
78 成功すると、これらの関数は
79 .I x
80 の底を 2 とする対数を返す。
81
82 .I x
83 が 0、1、負、無限大、NaN などのさまざまな特別な状況については、
84 .BR log (3)
85 を参照のこと。
86 .SH エラー
87 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
88 .BR math_error (7)
89 を参照のこと。
90
91 これらの関数で発生するエラーについては、
92 .BR log (3)
93 を参照のこと。
94 .SH バージョン
95 これらの関数は glibc バージョン 2.1 で初めて登場した。
96 .SH 準拠
97 C99, POSIX.1-2001.
98 .I double
99 版の関数は SVr4, 4.3BSD にも準拠している。
100 .SH 関連項目
101 .BR cbrt (3),
102 .BR clog2 (3),
103 .BR log (3),
104 .BR log10 (3),
105 .BR sqrt (3)