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.
5 .\" 2004-10-31, aeb, corrected
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>
14 .TH FPCLASSIFY 3 2010-09-20 "" "Linux Programmer's Manual"
17 .\"O fpclassify, isfinite, isnormal, isnan, isinf \- floating-point
18 .\"O classification macros
19 fpclassify, isfinite, isnormal, isnan, isinf \- ÉâÆ°¾®¿ôÅÀ¿ô¤ÎʬÎà¥Þ¥¯¥í
25 .BI "int fpclassify(" x );
27 .BI "int isfinite(" x );
29 .BI "int isnormal(" x );
36 .\"O Link with \fI\-lm\fP.
37 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
40 .\"O Feature Test Macro Requirements for glibc (see
41 .\"O .BR feature_test_macros (7)):
42 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
43 .RB ( feature_test_macros (7)
47 .\" I haven't fully grokked the source to determine the FTM requirements;
48 .\" in part, the following has been tested by experiment.
54 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
55 _POSIX_C_SOURCE\ >=\ 200112L;
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
63 _POSIX_C_SOURCE\ >=\ 200112L;
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
71 _POSIX_C_SOURCE\ >=\ 200112L;
79 .\"O Floating point numbers can have special values, such as
82 .\"O .BI fpclassify( x )
83 .\"O you can find out what type
86 .\"O The macro takes any floating-point expression as argument.
87 ÉâÆ°¾®¿ôÅÀ¿ô¤Ï̵¸ÂÂç¤ä NaN ¤Î¤è¤¦¤ÊÆÃÊ̤ÊÃͤò»ý¤Ä¤³¤È¤¬¤Ç¤¤ë¡£
92 ¤¬¤É¤Î¤è¤¦¤Ê¼ïÊ̤«¤òÃΤ뤳¤È¤¬¤Ç¤¤ë¡£
93 ¥Þ¥¯¥í¤ÏǤ°Õ¤ÎÉâÆ°¾®¿ôÅÀ¿ôɽ¸½¤ò°ú¤¿ô¤È¤·¤Æ¤È¤ë¤³¤È¤¬¤Ç¤¤ë¡£
94 .\"O The result is one of the following values:
95 ·ë²Ì¤Ï°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«°ì¤Ä¤Ç¤¢¤ë:
99 .\"O is "Not a Number".
101 ¤¬ "Not a Number" ¤Ç¤¢¤ë (¿ôÃͤǤϤʤ¤)¡£
105 .\"O is either positive infinity or negative infinity.
107 ¤¬Àµ¤Î̵¸ÂÂç¤Þ¤¿¤ÏÉé¤Î̵¸ÂÂç¤Ç¤¢¤ë¡£
117 .\"O is too small to be represented in normalized format.
119 ¤òÀµµ¬²½·Á¼°¤Çɽ¸½¤¹¤ë¤Ë¤Ï¾®¤µ¤¹¤®¤ë¡£
122 .\"O if nothing of the above is correct then it must be a
123 .\"O normal floating-point number.
124 ¾åµ¤Î¤É¤ì¤Ë¤âÅö¤Æ¤Ï¤Þ¤é¤Ê¤¤¾ì¹ç¤Ç¤¢¤ê¡¢
125 ÃͤÏÄ̾ï¤ÎÉâÆ°¾®¿ôÅÀ¿ô¤Ç¤¢¤ë¤Ï¤º¤À¡£
127 .\"O The other macros provide a short answer to some standard questions.
128 ¾¤Î¥Þ¥¯¥í¤Ï¡¢¤¤¤¯¤Ä¤«¤Îɸ½àŪ¤ÊÌ䤤¤ËÂФ·¤Æ¡¢´Êñ¤ÊÅú¤¨¤òÄ󶡤¹¤ë¡£
131 .\"O returns a nonzero value if
133 .\"O (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
134 (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
135 ¤Î¾ì¹ç¤Ë 0 °Ê³°¤ÎÃͤòÊÖ¤¹¡£
138 .\"O returns a nonzero value if
139 .\"O (fpclassify(x) == FP_NORMAL)
140 (fpclassify(x) == FP_NORMAL)
141 ¤Î¾ì¹ç¤Ë 0 °Ê³°¤ÎÃͤòÊÖ¤¹¡£
144 .\"O returns a nonzero value if
145 .\"O (fpclassify(x) == FP_NAN)
146 (fpclassify(x) == FP_NAN)
147 ¤Î¾ì¹ç¤Ë 0 °Ê³°¤ÎÃͤòÊÖ¤¹¡£
152 .\"O is positive infinity, and \-1 if
154 .\"O is negative infinity.
156 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¤Ï 1 ¤ò¡¢
157 Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£
158 .\"O .SH "CONFORMING TO"
164 .\"O the standards merely say that the return value is nonzero
165 .\"O if and only if the argument has an infinite value.
167 ¤Ë´Ø¤·¤Æ¡¢É¸½àµ¬³Ê¤ÇÄê¤á¤é¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢
168 ÊÖ¤êÃͤ¬ 0 °Ê³°¤Ë¤Ê¤ë¤Î¤Ï°ú¤¿ô¤¬Ìµ¸ÂÂç¤Î¾ì¹ç¤À¤±¤È¤¤¤¦¤³¤È¤À¤±¤Ç¤¢¤ë¡£
171 .\"O In glibc 2.01 and earlier,
173 .\"O returns a nonzero value (actually: 1) if
175 .\"O is positive infinity or negative infinity.
176 .\"O (This is all that C99 requires.)
177 glibc 2.01 °ÊÁ°¤Ç¤Ï¡¢
181 ¤¬Àµ¤Î̵¸ÂÂ礫Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
182 0 °Ê³°¤ÎÃÍ (¼ÂºÝ¤Ë¤Ï 1) ¤òÊÖ¤¹
183 (C99 ¤ÎÍ×µá»ÅÍͤǷè¤Þ¤Ã¤Æ¤¤¤ë¤Î¤Ï
184 0 °Ê³°¤ÎÃͤòÊÖ¤¹¤È¤¤¤¦¤³¤È¤À¤±¤Ç¤¢¤ë)¡£