1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
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 .\" Inspired by a page by Walter Harms created 2002-08-10
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>
33 .TH ILOGB 3 2010-09-20 "" "Linux Programmer's Manual"
36 .\"O ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value
37 ilogb, ilogbf, ilogbl \- ÉâÆ°¾®¿ôÅÀ¿ô¤Î»Ø¿ôÉô¤òÀ°¿ô¤È¤·¤Æ¼èÆÀ¤¹¤ë
42 .BI "int ilogb(double " x );
44 .BI "int ilogbf(float " x );
46 .BI "int ilogbl(long double " x );
48 .\"O Link with \fI\-lm\fP.
49 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
52 .\"O Feature Test Macro Requirements for glibc (see
53 .\"O .BR feature_test_macros (7)):
54 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
55 .RB ( feature_test_macros (7)
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
63 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
65 _POSIX_C_SOURCE\ >=\ 200112L;
74 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
75 _POSIX_C_SOURCE\ >=\ 200112L;
83 .\"O These functions return the exponent part of their argument
84 .\"O as a signed integer.
85 .\"O When no error occurs, these functions
86 .\"O are equivalent to the corresponding
88 .\"O functions, cast to
90 ¤³¤ì¤é¤Î´Ø¿ô¤Ï°ú¤¿ô¤Î»Ø¿ôÉô¤òÉä¹æÉÕ¤À°¿ô¤È¤·¤ÆÊÖ¤¹¡£
91 ¥¨¥é¡¼¤¬µ¯¤é¤Ê¤«¤Ã¤¿¾ì¹ç¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢Âбþ¤¹¤ë
95 ¤Ç¥¥ã¥¹¥È¤·¤¿¤â¤Î¤ÈÅù²Á¤Ç¤¢¤ë¡£
98 .\"O On success, these functions return the exponent of
100 .\"O as a signed integer.
101 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
103 ¤Î»Ø¿ôÉô¤òÉä¹æÉÕ¤À°¿ô¤È¤·¤ÆÊÖ¤¹¡£
107 .\"O is zero, then a domain error occurs, and the functions return
108 .\" the POSIX.1 spec for logb() says logb() gives pole error for this
109 .\" case, but for ilogb() it says domain error.
111 .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
113 ¤¬¥¼¥í¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
119 .\"O is a NaN, then a domain error occurs, and the functions return
120 .\"O .BR FP_ILOGBNAN .
121 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
122 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
124 ¤¬ NaN ¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
130 .\"O is negative infinity or positive infinity, then
131 .\"O a domain error occurs, and the functions return
134 ¤¬Éé¤Î̵¸ÂÂ礫Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
135 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
139 .\" POSIX.1-2001 also says:
140 .\" If the correct value is greater than {INT_MAX}, {INT_MAX}
141 .\" shall be returned and a domain error shall occur.
143 .\" If the correct value is less than {INT_MIN}, {INT_MIN}
144 .\" shall be returned and a domain error shall occur.
148 .\"O .BR math_error (7)
149 .\"O for information on how to determine whether an error has occurred
150 .\"O when calling these functions.
151 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
155 .\"O The following errors can occur:
156 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
158 .\"O Domain error: \fIx\fP is 0 or a NaN
159 Îΰ襨¥é¡¼: \fIx\fP ¤¬ 0 ¤« NaN
163 .\"O An invalid floating-point exception
164 .\"O .RB ( FE_INVALID )
166 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
170 .\"O These functions do not set
173 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¤³¤Î¾õ¶·¤Ç
176 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
178 .\"O Domain error: \fIx\fP is an infinity
179 Îΰ襨¥é¡¼: \fIx\fP ¤¬Ìµ¸ÂÂç
183 .\" An invalid floating-point exception
184 .\" .RB ( FE_INVALID )
187 .\"O These functions do not set
189 .\"O or raise an exception for this case.
190 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¤³¤Î¾õ¶·¤Ç
192 ¤òÀßÄꤻ¤º¡¢Îã³°¤â¾å¤²¤Ê¤¤¡£
193 .\" FIXME . Is it intentional that these functions do not set errno,
194 .\" or raise an exception?
195 .\" log(), log2(), log10() do set errno
196 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
197 .\"O .SH "CONFORMING TO"