1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" 2002-07-27 Walter Harms
4 .\" this was done with the help of the glibc manual
6 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
7 .\" all rights reserved.
8 .\" Translated Fri Aug 20 04:03:26 JST 2004
9 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
10 .\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO
11 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
13 .TH ISGREATER 3 2008-08-05 "" "Linux Programmer's Manual"
16 .\"O isgreater, isgreaterequal, isless, islessequal, islessgreater,
17 .\"O isunordered \- floating-point relational tests without exception for NaN
18 isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered \-
19 NaN ¤ËÂФ·¤ÆÎã³°¤òȯÀ¸¤»¤º¤Ë¡¢ÉâÆ°¾®¿ôÅÀ¿ô¤ÎÂç¾®´Ø·¸¤ÎȽÄê¤ò¹Ô¤¦
25 .BI "int isgreater(" x ", " y );
27 .BI "int isgreaterequal(" x ", " y );
29 .BI "int isless(" x ", " y );
31 .BI "int islessequal(" x ", " y );
33 .BI "int islessgreater(" x ", " y );
35 .BI "int isunordered(" x ", " y );
38 .\"O Link with \fI\-lm\fP.
39 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
42 .\"O Feature Test Macro Requirements for glibc (see
43 .\"O .BR feature_test_macros (7)):
44 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
45 .RB ( feature_test_macros (7)
50 .\"O All functions described here:
51 ¤³¤³¤ÇÀâÌÀ¤¹¤ëÁ´¤Æ¤Î´Ø¿ô:
52 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
57 .\"O The normal relation operations (like \fB<\fP, "less than")
58 .\"O will fail if one of the operands is NaN.
59 .\"O This will cause an exception.
60 .\"O To avoid this, C99 defines these macros.
61 .\"O The macros are guaranteed to evaluate their operands only once.
62 .\"O The operands can be of any real floating-point type.
63 (\fB<\fP¡¢¡Ö¾®¤Ê¤ê¡×¤Î¤è¤¦¤Ê) Ä̾ï¤Î´Ø·¸Áàºî (relation operations) ¤Ï¡¢
64 ¥ª¥Ú¥é¥ó¥É¤Î°ìÊý¤¬ NaN ¤Î¾ì¹ç¤Ë¤Ï¼ºÇÔ¤¹¤ë¡£
65 ¤³¤ì¤ÏÎã³°¤Î¸¶°ø¤Ë¤Ê¤ë¡£
66 ¤³¤ì¤òÈò¤±¤ë¤¿¤á¡¢C99 ¤Ç¤Ï¼¡¤Î¤è¤¦¤Ê¥Þ¥¯¥í¤òÄêµÁ¤·¤Æ¤¤¤ë¡£
67 ¤³¤ì¤é¤Î¥Þ¥¯¥í¤Ï¥ª¥Ú¥é¥ó¥É¤ò 1 ²ó¤À¤±É¾²Á¤¹¤ë¤³¤È¤¬Êݾڤµ¤ì¤Æ¤¤¤ë¡£
68 ¥ª¥Ú¥é¥ó¥É¤Ë¤ÏǤ°Õ¤Î¼Â¿ô¤ÎÉâÆ°¾®¿ôÅÀ¿ô·¿¤ò»ØÄê¤Ç¤¤ë¡£
71 .\"O determines \fI(x)\ >\ (y)\fP without an exception
72 .\"O if \fIx\fP or \fIy\fP is NaN.
73 \fI(x)\ >\ (y)\fP ¤ò·èÄꤹ¤ë¡£
74 \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£
77 .\"O determines \fI(x)\ >=\ (y)\fP without an exception
78 .\"O if \fIx\fP or \fIy\fP is NaN.
79 \fI(x)\ >=\ (y)\fP ¤ò·èÄꤹ¤ë¡£
80 \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£
83 .\"O determines \fI(x)\ <\ (y)\fP without an exception
84 .\"O if \fIx\fP or \fIy\fP is NaN.
85 \fI(x)\ <\ (y)\fP ¤ò·èÄꤹ¤ë¡£
86 \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£
89 .\"O determines \fI(x)\ <=\ (y)\fP without an exception
90 .\"O if \fIx\fP or \fIy\fP is NaN.
91 \fI(x)\ <=\ (y)\fP ¤ò·èÄꤹ¤ë¡£
92 \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£
95 .\"O determines \fI(x)\ < (y) || (x) >\ (y)\fP
96 .\"O without an exception if \fIx\fP or \fIy\fP is NaN.
97 .\"O This macro is not equivalent to \fIx\ !=\ y\fP because that expression is
98 .\"O true if \fIx\fP or \fIy\fP is NaN.
99 \fI(x)\ < (y) || (x) >\ (y)\fP ¤ò·èÄꤹ¤ë¡£
100 \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£
101 ¤³¤Î¥Þ¥¯¥í¤Ï \fIx\ !=\ y\fP ¤ÈÅù²Á¤Ç¤Ï¤Ê¤¤¡£
102 ¤Ê¤¼¤Ê¤é¡¢¤³¤Îɾ²Á¼°¤Ï \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Î¾ì¹ç¤Ë
103 true ¤È¤Ê¤ë¤¿¤á¤Ç¤¢¤ë¡£
106 .\"O determines whether its arguments are unordered, that is, whether
107 .\"O at least one of the arguments is a NaN.
108 °ú¤¿ô¤¬ unordered ¤«¤É¤¦¤«¡¢¤Ä¤Þ¤ê°ú¤¿ô¤Î¾¯¤Ê¤¯¤È¤â°ìÊý¤¬ NaN ¤«¤É¤¦¤«
110 .\"O .SH RETURN VALUE
112 .\"O The macros other than
113 .\"O .BR isunordered ()
114 .\"O return the result of the relational comparison;
115 .\"O these macros return 0 if either argument is a NaN.
117 °Ê³°¤Î¥Þ¥¯¥í¤Ï´Ø·¸Áàºî¤Î·ë²Ì¤òÊÖ¤¹¡£
118 °ìÊý¤Î°ú¤¿ô¤¬ NaN ¤Î¾ì¹ç¡¢¤³¤ì¤é¤Î¥Þ¥¯¥í¤Ï 0 ¤òÊÖ¤¹¡£
120 .\"O .BR isunordered ()
121 .\"O returns 1 if \fIx\fP or \fIy\fP is NaN and 0 otherwise.
123 ¤Ï \fIx\fP ¤« \fIy\fP ¤¬ NaN ¤Î¾ì¹ç 1 ¤ò¡¢
124 ¤½¤ì°Ê³°¤Î¾ì¹ç 0 ¤òÊÖ¤¹¡£
127 .\"O No errors occur.
129 .\"O .SH "CONFORMING TO"
134 .\"O Not all hardware supports these functions,
135 .\"O and where hardware support isn't provided, they will be emulated by macros.
136 .\"O This will result in a performance penalty.
137 ¤³¤ì¤é¤Î´Ø¿ô¤ÏÁ´¤Æ¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
138 ¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥Þ¥¯¥í¤Ç¥¨¥ß¥å¥ì¡¼¥È¤µ¤ì¤ë¡£
139 ¥¨¥ß¥å¥ì¡¼¥È¤µ¤ì¤ë¾ì¹ç¤Ï¡¢Àǽ¾å¤Ç¤ÎÉÔÍø¤È¤Ê¤ë¡£
140 .\"O Don't use these functions if NaN is of no concern for you.
141 NaN ¤Ë¤Ä¤¤¤Æ¿´ÇÛ¤·¤Ê¤¯¤Æ¹½¤ï¤Ê¤¤¾ì¹ç¤Ï¡¢
142 ¤³¤ì¤é¤Î´Ø¿ô¤ò»È¤ï¤Ê¤¤¤³¤È¡£