OSDN Git Service

(split) LDP: draft snapshot generated from latest pthread/ja.po files.
[linuxjm/LDP_man-pages.git] / release / man3 / ilogb.3
1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
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 .\" Inspired by a page by Walter Harms created 2002-08-10
26 .\"
27 .\" Japanese Version Copyright (c) 2005 Yuichi SATO
28 .\" and Copyright (c) 2008 Akihiro MOTOKI
29 .\" Translated Sat Jan 29 05:17:36 JST 2005
30 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
31 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"
33 .TH ILOGB 3 2010-09-20 "" "Linux Programmer's Manual"
34 .SH 名前
35 ilogb, ilogbf, ilogbl \- 浮動小数点数の指数部を整数として取得する
36 .SH 書式
37 .B #include <math.h>
38 .sp
39 .BI "int ilogb(double " x );
40 .br
41 .BI "int ilogbf(float " x );
42 .br
43 .BI "int ilogbl(long double " x );
44 .sp
45 \fI\-lm\fP でリンクする。
46 .sp
47 .in -4n
48 glibc 向けの機能検査マクロの要件
49 .RB ( feature_test_macros (7)
50 参照):
51 .in
52 .sp
53 .ad l
54 .BR ilogb ():
55 .RS 4
56 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
57 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
58 _ISOC99_SOURCE ||
59 _POSIX_C_SOURCE\ >=\ 200112L;
60 .br
61 or
62 .I cc\ -std=c99
63 .RE
64 .br
65 .BR ilogbf (),
66 .BR ilogbl ():
67 .RS 4
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
69 _POSIX_C_SOURCE\ >=\ 200112L;
70 .br
71 or
72 .I cc\ -std=c99
73 .RE
74 .ad b
75 .SH 説明
76 これらの関数は引き数の指数部を符号付き整数として返す。
77 エラーが起らなかった場合、これらの関数は、対応する
78 .BR logb (3)
79 関数を
80 .I int
81 でキャストしたものと等価である。
82 .SH 返り値
83 成功すると、これらの関数は
84 .I x
85 の指数部を符号付き整数として返す。
86
87 .\" the POSIX.1 spec for logb() says logb() gives pole error for this
88 .\" case, but for ilogb() it says domain error.
89 .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
90 .I x
91 がゼロの場合、領域エラー (domain error) が発生し、
92 .B FP_ILOGB0
93 が返される。
94
95 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
96 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
97 .I x
98 が NaN の場合、領域エラー (domain error) が発生し、
99 .B FP_ILOGBNAN
100 が返される。
101
102 .I x
103 が負の無限大か正の無限大の場合、
104 領域エラー (domain error) が発生し、
105 .B INT_MAX
106 が返される。
107 .\"
108 .\" POSIX.1-2001 also says:
109 .\" If the correct value is greater than {INT_MAX}, {INT_MAX}
110 .\" shall be returned and a domain error shall occur.
111 .\"
112 .\" If the correct value is less than {INT_MIN}, {INT_MIN}
113 .\" shall be returned and a domain error shall occur.
114 .SH エラー
115 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
116 .BR math_error (7)
117 を参照のこと。
118 .PP
119 以下のエラーが発生する可能性がある。
120 .TP
121 領域エラー: \fIx\fP が 0 か NaN
122 .\" .I errno
123 .\" is set to
124 .\" .BR EDOM .
125 不正 (invalid) 浮動小数点例外
126 .RB ( FE_INVALID )
127 が上がる。
128 .IP
129 これらの関数は、この状況で
130 .I errno
131 を設定しない。
132 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
133 .TP
134 領域エラー: \fIx\fP が無限大
135 .\" .I errno
136 .\" is set to
137 .\" .BR EDOM .
138 .\" An invalid floating-point exception
139 .\" .RB ( FE_INVALID )
140 .\" is raised.
141 .IP
142 これらの関数は、この状況で
143 .I errno
144 を設定せず、例外も上げない。
145 .\" FIXME . Is it intentional that these functions do not set errno,
146 .\" or raise an exception?
147 .\" log(), log2(), log10() do set errno
148 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
149 .SH 準拠
150 C99, POSIX.1-2001.
151 .SH 関連項目
152 .BR log (3),
153 .BR logb (3),
154 .BR significand (3)