OSDN Git Service

Update README
[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 .\"
35 .\" Japanese Version Copyright (c) 2005 Yuichi SATO
36 .\" and Copyright (c) 2008 Akihiro MOTOKI
37 .\" Translated Sat Jan 29 05:17:36 JST 2005
38 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
39 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH ILOGB 3 2014\-12\-31 "" "Linux Programmer's Manual"
42 .SH 名前
43 ilogb, ilogbf, ilogbl \- 浮動小数点数の指数部を整数として取得する
44 .SH 書式
45 \fB#include <math.h>\fP
46 .sp
47 \fBint ilogb(double \fP\fIx\fP\fB);\fP
48 .br
49 \fBint ilogbf(float \fP\fIx\fP\fB);\fP
50 .br
51 \fBint ilogbl(long double \fP\fIx\fP\fB);\fP
52 .sp
53 \fI\-lm\fP でリンクする。
54 .sp
55 .in -4n
56 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
57 .in
58 .sp
59 .ad l
60 \fBilogb\fP():
61 .RS 4
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
63 .br
64 or \fIcc\ \-std=c99\fP
65 .RE
66 .br
67 \fBilogbf\fP(), \fBilogbl\fP():
68 .RS 4
69 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
70 || _POSIX_C_SOURCE\ >=\ 200112L;
71 .br
72 or \fIcc\ \-std=c99\fP
73 .RE
74 .ad b
75 .SH 説明
76 これらの関数は引き数の指数部を符号付き整数として返す。 エラーが起らなかった場合、これらの関数は、対応する \fBlogb\fP(3)  関数を \fIint\fP
77 でキャストしたものと等価である。
78 .SH 返り値
79 成功すると、これらの関数は \fIx\fP の指数部を符号付き整数として返す。
80
81 .\" the POSIX.1 spec for logb() says logb() gives pole error for this
82 .\" case, but for ilogb() it says domain error.
83 .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
84 \fIx\fP がゼロの場合、領域エラー (domain error) が発生し、 \fBFP_ILOGB0\fP が返される。
85
86 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
87 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
88 \fIx\fP が NaN の場合、領域エラー (domain error) が発生し、 \fBFP_ILOGBNAN\fP が返される。
89
90 .\"
91 .\" POSIX.1-2001 also says:
92 .\" If the correct value is greater than {INT_MAX}, {INT_MAX}
93 .\" shall be returned and a domain error shall occur.
94 .\"
95 .\" If the correct value is less than {INT_MIN}, {INT_MIN}
96 .\" shall be returned and a domain error shall occur.
97 \fIx\fP が負の無限大か正の無限大の場合、 領域エラー (domain error) が発生し、 \fBINT_MAX\fP が返される。
98 .SH エラー
99 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
100 .PP
101 以下のエラーが発生する可能性がある。
102 .TP 
103 領域エラー: \fIx\fP が 0 か NaN
104 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がり、 \fIerrno\fP に \fBEDOM\fP が設定される
105 (ただし、「バグ」を参照)。
106 .IP
107 .TP 
108 領域エラー (domain error): \fIx\fP が無限大である
109 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がり、 \fIerrno\fP に \fBEDOM\fP が設定される
110 (ただし、「バグ」を参照)。
111 .SH 属性
112 .SS "マルチスレッディング (pthreads(7) 参照)"
113 関数 \fBilogb\fP(), \fBilogbf\fP(), \fBilogbl\fP() はスレッドセーフである。
114 .SH 準拠
115 C99, POSIX.1\-2001.
116 .SH バグ
117 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
118 バージョン 2.16 より前では、これらの関数の glibc 実装には以下のバグが存在した。
119 .IP * 3
120 \fIx\fP が 0 か NaN の場合の領域エラーで、\fIerrno\fP が設定されなかったり、(アーキテクチャーによっては)
121 浮動小数点例外が上がらなかった。
122 .IP * 3
123 \fIx\fP が無限大の場合の領域エラーで、\fIerrno\fP が設定されず、浮動小数点例外が上がらなかった。
124 .SH 関連項目
125 \fBlog\fP(3), \fBlogb\fP(3), \fBsignificand\fP(3)
126 .SH この文書について
127 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
128 である。プロジェクトの説明とバグ報告に関する情報は
129 http://www.kernel.org/doc/man\-pages/ に書かれている。