OSDN Git Service

67ca618b30448eefad039236ff8f315359ebb7b4
[linuxjm/LDP_man-pages.git] / draft / 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 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\" Inspired by a page by Walter Harms created 2002-08-10
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH ILOGB 3 2010\-09\-20 "" "Linux Programmer's Manual"
35 .SH 名前
36 ilogb, ilogbf, ilogbl \- 浮動小数点数の指数部を整数として取得する
37 .SH 書式
38 \fB#include <math.h>\fP
39 .sp
40 \fBint ilogb(double \fP\fIx\fP\fB);\fP
41 .br
42 \fBint ilogbf(float \fP\fIx\fP\fB);\fP
43 .br
44 \fBint ilogbl(long double \fP\fIx\fP\fB);\fP
45 .sp
46 \fI\-lm\fP でリンクする。
47 .sp
48 .in -4n
49 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
50 .in
51 .sp
52 .ad l
53 \fBilogb\fP():
54 .RS 4
55 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
56 .br
57 or \fIcc\ \-std=c99\fP
58 .RE
59 .br
60 \fBilogbf\fP(), \fBilogbl\fP():
61 .RS 4
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
63 || _POSIX_C_SOURCE\ >=\ 200112L;
64 .br
65 or \fIcc\ \-std=c99\fP
66 .RE
67 .ad b
68 .SH 説明
69 これらの関数は引き数の指数部を符号付き整数として返す。 エラーが起らなかった場合、これらの関数は、対応する \fBlogb\fP(3)  関数を \fIint\fP
70 でキャストしたものと等価である。
71 .SH 返り値
72 成功すると、これらの関数は \fIx\fP の指数部を符号付き整数として返す。
73
74 .\" the POSIX.1 spec for logb() says logb() gives pole error for this
75 .\" case, but for ilogb() it says domain error.
76 .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
77 \fIx\fP がゼロの場合、領域エラー (domain error) が発生し、 \fBFP_ILOGB0\fP が返される。
78
79 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
80 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
81 \fIx\fP が NaN の場合、領域エラー (domain error) が発生し、 \fBFP_ILOGBNAN\fP が返される。
82
83 .\"
84 .\" POSIX.1-2001 also says:
85 .\" If the correct value is greater than {INT_MAX}, {INT_MAX}
86 .\" shall be returned and a domain error shall occur.
87 .\"
88 .\" If the correct value is less than {INT_MIN}, {INT_MIN}
89 .\" shall be returned and a domain error shall occur.
90 \fIx\fP が負の無限大か正の無限大の場合、 領域エラー (domain error) が発生し、 \fBINT_MAX\fP が返される。
91 .SH エラー
92 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
93 .PP
94 以下のエラーが発生する可能性がある。
95 .TP 
96 領域エラー: \fIx\fP が 0 か NaN
97 .\" .I errno
98 .\" is set to
99 .\" .BR EDOM .
100 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
101 .IP
102 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
103 これらの関数は、この場合に \fIerrno\fP を設定しない。
104 .TP 
105 領域エラー (domain error): \fIx\fP が無限大である
106 .\" .I errno
107 .\" is set to
108 .\" .BR EDOM .
109 .\" An invalid floating-point exception
110 .\" .RB ( FE_INVALID )
111 .\" is raised.
112 .IP
113 .\" FIXME . Is it intentional that these functions do not set errno,
114 .\" or raise an exception?
115 .\" log(), log2(), log10() do set errno
116 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
117 これらの関数は、この状況で \fIerrno\fP を設定せず、例外も上げない。
118 .SH 準拠
119 C99, POSIX.1\-2001.
120 .SH 関連項目
121 \fBlog\fP(3), \fBlogb\fP(3), \fBsignificand\fP(3)
122 .SH この文書について
123 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
124 である。プロジェクトの説明とバグ報告に関する情報は
125 http://www.kernel.org/doc/man\-pages/ に書かれている。