OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / fpclassify.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL, 2002-07-27 Walter Harms
3 .\" This was done with the help of the glibc manual.
4 .\"
5 .\" 2004-10-31, aeb, corrected
6 .\"
7 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
8 .\"         all rights reserved.
9 .\" Translated 2004-07-27, Yuichi SATO <ysato444@yahoo.co.jp>
10 .\" Updated & Modified 2005-01-10, Yuichi SATO
11 .\" Updated & Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
12 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
13 .\"
14 .TH FPCLASSIFY 3  2010-09-20 "" "Linux Programmer's Manual"
15 .\"O .SH NAME
16 .SH 名前
17 .\"O fpclassify, isfinite, isnormal, isnan, isinf \- floating-point
18 .\"O classification macros
19 fpclassify, isfinite, isnormal, isnan, isinf \- 浮動小数点数の分類マクロ
20 .\"O .SH SYNOPSIS
21 .SH 書式
22 .nf
23 .B #include <math.h>
24 .sp
25 .BI "int fpclassify(" x );
26 .sp
27 .BI "int isfinite(" x );
28 .sp
29 .BI "int isnormal(" x );
30 .sp
31 .BI "int isnan(" x );
32 .sp
33 .BI "int isinf(" x );
34 .fi
35 .sp
36 .\"O Link with \fI\-lm\fP.
37 \fI\-lm\fP でリンクする。
38 .sp
39 .in -4n
40 .\"O Feature Test Macro Requirements for glibc (see
41 .\"O .BR feature_test_macros (7)):
42 glibc 向けの機能検査マクロの要件
43 .RB ( feature_test_macros (7)
44 参照):
45 .in
46 .sp
47 .\" I haven't fully grokked the source to determine the FTM requirements;
48 .\" in part, the following has been tested by experiment.
49 .ad l
50 .BR fpclassify (),
51 .BR isfinite (),
52 .BR isnormal ():
53 .RS 4
54 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
55 _POSIX_C_SOURCE\ >=\ 200112L;
56 .br
57 or
58 .I cc\ -std=c99
59 .RE
60 .BR isnan ():
61 .RS 4
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
63 _POSIX_C_SOURCE\ >=\ 200112L;
64 .br
65 or
66 .I cc\ -std=c99
67 .RE
68 .BR isinf ():
69 .RS 4
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
71 _POSIX_C_SOURCE\ >=\ 200112L;
72 .br
73 or
74 .I cc\ -std=c99
75 .RE
76 .ad
77 .\"O .SH DESCRIPTION
78 .SH 説明
79 .\"O Floating point numbers can have special values, such as
80 .\"O infinite or NaN.
81 .\"O With the macro
82 .\"O .BI fpclassify( x )
83 .\"O you can find out what type
84 .\"O .I x
85 .\"O is.
86 .\"O The macro takes any floating-point expression as argument.
87 浮動小数点数は無限大や NaN のような特別な値を持つことができる。
88 マクロ
89 .BI fpclassify( x )
90
91 .I x
92 がどのような種別かを知ることができる。
93 マクロは任意の浮動小数点数表現を引き数としてとることができる。
94 .\"O The result is one of the following values:
95 結果は以下の値のいずれか一つである:
96 .TP 14
97 .B FP_NAN
98 .\"O .I x
99 .\"O is "Not a Number".
100 .I x
101 が "Not a Number" である (数値ではない)。
102 .TP
103 .B FP_INFINITE
104 .\"O .I x
105 .\"O is either positive infinity or negative infinity.
106 .I x
107 が正の無限大または負の無限大である。
108 .TP
109 .B FP_ZERO
110 .\"O .I x
111 .\"O is zero.
112 .I x
113 が 0 である。
114 .TP
115 .B FP_SUBNORMAL
116 .\"O .I x
117 .\"O is too small to be represented in normalized format.
118 .I x
119 を正規化形式で表現するには小さすぎる。
120 .TP
121 .B FP_NORMAL
122 .\"O if nothing of the above is correct then it must be a
123 .\"O normal floating-point number.
124 上記のどれにも当てはまらない場合であり、
125 値は通常の浮動小数点数であるはずだ。
126 .LP
127 .\"O The other macros provide a short answer to some standard questions.
128 他のマクロは、いくつかの標準的な問いに対して、簡単な答えを提供する。
129 .TP 14
130 .BI isfinite( x )
131 .\"O returns a nonzero value if
132 .\"O .br
133 .\"O (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
134 (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
135 の場合に 0 以外の値を返す。
136 .TP
137 .BI isnormal( x )
138 .\"O returns a nonzero value if
139 .\"O (fpclassify(x) == FP_NORMAL)
140 (fpclassify(x) == FP_NORMAL)
141 の場合に 0 以外の値を返す。
142 .TP
143 .BI isnan( x )
144 .\"O returns a nonzero value if
145 .\"O (fpclassify(x) == FP_NAN)
146 (fpclassify(x) == FP_NAN)
147 の場合に 0 以外の値を返す。
148 .TP
149 .BI isinf( x )
150 .\"O returns 1 if
151 .\"O .I x
152 .\"O is positive infinity, and \-1 if
153 .\"O .I x
154 .\"O is negative infinity.
155 .I x
156 が正の無限大の場合は 1 を、
157 負の無限大の場合は \-1 を返す。
158 .\"O .SH "CONFORMING TO"
159 .SH 準拠
160 C99, POSIX.1.
161
162 .\"O For
163 .\"O .BR isinf (),
164 .\"O the standards merely say that the return value is nonzero
165 .\"O if and only if the argument has an infinite value.
166 .BR isinf ()
167 に関して、標準規格で定められているのは、
168 返り値が 0 以外になるのは引き数が無限大の場合だけということだけである。
169 .\"O .SH NOTES
170 .SH 注意
171 .\"O In glibc 2.01 and earlier,
172 .\"O .BR isinf ()
173 .\"O returns a nonzero value (actually: 1) if
174 .\"O .I x
175 .\"O is positive infinity or negative infinity.
176 .\"O (This is all that C99 requires.)
177 glibc 2.01 以前では、
178 .BR isinf ()
179
180 .I x
181 が正の無限大か負の無限大の場合、
182 0 以外の値 (実際には 1) を返す
183 (C99 の要求仕様で決まっているのは
184 0 以外の値を返すということだけである)。
185 .\"O .SH "SEE ALSO"
186 .SH 関連項目
187 .BR finite (3),
188 .BR INFINITY (3),
189 .BR isgreater (3),
190 .BR signbit (3)