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"
35 ilogb, ilogbf, ilogbl \- 浮動小数点数の指数部を整数として取得する
39 .BI "int ilogb(double " x );
41 .BI "int ilogbf(float " x );
43 .BI "int ilogbl(long double " x );
49 .RB ( feature_test_macros (7)
56 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
57 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
59 _POSIX_C_SOURCE\ >=\ 200112L;
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
69 _POSIX_C_SOURCE\ >=\ 200112L;
76 これらの関数は引き数の指数部を符号付き整数として返す。
77 エラーが起らなかった場合、これらの関数は、対応する
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'.
91 がゼロの場合、領域エラー (domain error) が発生し、
95 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
96 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
98 が NaN の場合、領域エラー (domain error) が発生し、
104 領域エラー (domain error) が発生し、
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.
112 .\" If the correct value is less than {INT_MIN}, {INT_MIN}
113 .\" shall be returned and a domain error shall occur.
115 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
121 領域エラー: \fIx\fP が 0 か NaN
132 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
138 .\" An invalid floating-point exception
139 .\" .RB ( FE_INVALID )
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