X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman3%2Fisgreater.3;h=168f3dc8aea49bc48519be7f23cec89b4c7d052f;hb=c1dfa2f6ab1bbed84992d3c59ee9925f4d453668;hp=ebd168edb0f1d4c350e7c260fb1d5d3b85ff0880;hpb=633a2252e0be3c867dce264a180a89ce8181d36f;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man3/isgreater.3 b/draft/man3/isgreater.3 index ebd168ed..168f3dc8 100644 --- a/draft/man3/isgreater.3 +++ b/draft/man3/isgreater.3 @@ -1,146 +1,95 @@ .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) .\" Distributed under GPL +.\" %%%LICENSE_END +.\" .\" 2002-07-27 Walter Harms .\" this was done with the help of the glibc manual .\" -.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO -.\" all rights reserved. -.\" Translated Fri Aug 20 04:03:26 JST 2004 -.\" by Yuichi SATO -.\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO -.\" Updated 2008-09-18, Akihiro MOTOKI +.\"******************************************************************* .\" -.TH ISGREATER 3 2008-08-05 "" "Linux Programmer's Manual" -.\"O .SH NAME -.SH ̾Á° -.\"O isgreater, isgreaterequal, isless, islessequal, islessgreater, -.\"O isunordered \- floating-point relational tests without exception for NaN +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH ISGREATER 3 2012\-05\-06 "" "Linux Programmer's Manual" +.SH 名前 isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered \- -NaN ¤ËÂФ·¤ÆÎã³°¤òȯÀ¸¤»¤º¤Ë¡¢ÉâÆ°¾®¿ôÅÀ¿ô¤ÎÂç¾®´Ø·¸¤ÎȽÄê¤ò¹Ô¤¦ -.\"O .SH SYNOPSIS -.SH ½ñ¼° +NaN に対して例外を発生せずに、浮動小数点数の大小関係の判定を行う +.SH 書式 .nf -.B #include +\fB#include \fP .sp -.BI "int isgreater(" x ", " y ); +\fBint isgreater(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .sp -.BI "int isgreaterequal(" x ", " y ); +\fBint isgreaterequal(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .sp -.BI "int isless(" x ", " y ); +\fBint isless(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .sp -.BI "int islessequal(" x ", " y ); +\fBint islessequal(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .sp -.BI "int islessgreater(" x ", " y ); +\fBint islessgreater(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .sp -.BI "int isunordered(" x ", " y ); +\fBint isunordered(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP .fi .sp -.\"O Link with \fI\-lm\fP. -\fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£ +\fI\-lm\fP でリンクする。 .sp .in -4n -.\"O Feature Test Macro Requirements for glibc (see -.\"O .BR feature_test_macros (7)): -glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï -.RB ( feature_test_macros (7) -»²¾È): +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l -.\"O All functions described here: -¤³¤³¤ÇÀâÌÀ¤¹¤ëÁ´¤Æ¤Î´Ø¿ô: -_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or -.I cc\ -std=c99 +ここで説明する全ての関数: +.RS +_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; +.br +or \fIcc\ \-std=c99\fP +.RE .ad b -.\"O .SH DESCRIPTION -.SH ÀâÌÀ -.\"O The normal relation operations (like \fB<\fP, "less than") -.\"O will fail if one of the operands is NaN. -.\"O This will cause an exception. -.\"O To avoid this, C99 defines these macros. -.\"O The macros are guaranteed to evaluate their operands only once. -.\"O The operands can be of any real floating-point type. -(\fB<\fP¡¢¡Ö¾®¤Ê¤ê¡×¤Î¤è¤¦¤Ê) Ä̾ï¤Î´Ø·¸Áàºî (relation operations) ¤Ï¡¢ -¥ª¥Ú¥é¥ó¥É¤Î°ìÊý¤¬ NaN ¤Î¾ì¹ç¤Ë¤Ï¼ºÇÔ¤¹¤ë¡£ -¤³¤ì¤ÏÎã³°¤Î¸¶°ø¤Ë¤Ê¤ë¡£ -¤³¤ì¤òÈò¤±¤ë¤¿¤á¡¢C99 ¤Ç¤Ï¼¡¤Î¤è¤¦¤Ê¥Þ¥¯¥í¤òÄêµÁ¤·¤Æ¤¤¤ë¡£ -¤³¤ì¤é¤Î¥Þ¥¯¥í¤Ï¥ª¥Ú¥é¥ó¥É¤ò 1 ²ó¤À¤±É¾²Á¤¹¤ë¤³¤È¤¬Êݾڤµ¤ì¤Æ¤¤¤ë¡£ -¥ª¥Ú¥é¥ó¥É¤Ë¤ÏǤ°Õ¤Î¼Â¿ô¤ÎÉâÆ°¾®¿ôÅÀ¿ô·¿¤ò»ØÄê¤Ç¤­¤ë¡£ -.TP -.BR isgreater () -.\"O determines \fI(x)\ >\ (y)\fP without an exception -.\"O if \fIx\fP or \fIy\fP is NaN. -\fI(x)\ >\ (y)\fP ¤ò·èÄꤹ¤ë¡£ -\fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£ -.TP -.BR isgreaterequal () -.\"O determines \fI(x)\ >=\ (y)\fP without an exception -.\"O if \fIx\fP or \fIy\fP is NaN. -\fI(x)\ >=\ (y)\fP ¤ò·èÄꤹ¤ë¡£ -\fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£ -.TP -.BR isless () -.\"O determines \fI(x)\ <\ (y)\fP without an exception -.\"O if \fIx\fP or \fIy\fP is NaN. -\fI(x)\ <\ (y)\fP ¤ò·èÄꤹ¤ë¡£ -\fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£ -.TP -.BR islessequal () -.\"O determines \fI(x)\ <=\ (y)\fP without an exception -.\"O if \fIx\fP or \fIy\fP is NaN. -\fI(x)\ <=\ (y)\fP ¤ò·èÄꤹ¤ë¡£ -\fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£ -.TP -.BR islessgreater () -.\"O determines \fI(x)\ < (y) || (x) >\ (y)\fP -.\"O without an exception if \fIx\fP or \fIy\fP is NaN. -.\"O This macro is not equivalent to \fIx\ !=\ y\fP because that expression is -.\"O true if \fIx\fP or \fIy\fP is NaN. -\fI(x)\ < (y) || (x) >\ (y)\fP ¤ò·èÄꤹ¤ë¡£ -\fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Ç¤âÎã³°¤òȯÀ¸¤·¤Ê¤¤¡£ -¤³¤Î¥Þ¥¯¥í¤Ï \fIx\ !=\ y\fP ¤ÈÅù²Á¤Ç¤Ï¤Ê¤¤¡£ -¤Ê¤¼¤Ê¤é¡¢¤³¤Îɾ²Á¼°¤Ï \fIx\fP ¤Þ¤¿¤Ï \fIy\fP ¤¬ NaN ¤Î¾ì¹ç¤Ë -true ¤È¤Ê¤ë¤¿¤á¤Ç¤¢¤ë¡£ -.TP -.BR isunordered () -.\"O determines whether its arguments are unordered, that is, whether -.\"O at least one of the arguments is a NaN. -°ú¤­¿ô¤¬ unordered ¤«¤É¤¦¤«¡¢¤Ä¤Þ¤ê°ú¤­¿ô¤Î¾¯¤Ê¤¯¤È¤â°ìÊý¤¬ NaN ¤«¤É¤¦¤« -¤òȽÄꤹ¤ë¡£ -.\"O .SH RETURN VALUE -.SH ÊÖ¤êÃÍ -.\"O The macros other than -.\"O .BR isunordered () -.\"O return the result of the relational comparison; -.\"O these macros return 0 if either argument is a NaN. -.BR isunordered () -°Ê³°¤Î¥Þ¥¯¥í¤Ï´Ø·¸Áàºî¤Î·ë²Ì¤òÊÖ¤¹¡£ -°ìÊý¤Î°ú¤­¿ô¤¬ NaN ¤Î¾ì¹ç¡¢¤³¤ì¤é¤Î¥Þ¥¯¥í¤Ï 0 ¤òÊÖ¤¹¡£ +.SH 説明 +(\fB<\fP、「小なり」のような) 通常の関係操作 (relation operations) は、 +オペランドの一方が NaN の場合には失敗する。 これは例外の原因になる。 +これを避けるため、C99 では以下のリストに示すマクロを定義している。 + +これらのマクロでは、引き数を 1 回だけ評価することが保証されている。 +引き数には実数の浮動小数点数型を指定しなければならない。 +(注意: これらのマクロの引き数に整数値を渡さないこと。なぜなら +整数値の引き数は実数の浮動小数点型に変換されないからである。) +.TP +\fBisgreater\fP() +\fI(x)\ >\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。 +.TP +\fBisgreaterequal\fP() +\fI(x)\ >=\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。 +.TP +\fBisless\fP() +\fI(x)\ <\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。 +.TP +\fBislessequal\fP() +\fI(x)\ <=\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。 +.TP +\fBislessgreater\fP() +\fI(x)\ < (y) || (x) >\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。 +このマクロは \fIx\ !=\ y\fP と等価ではない。 なぜなら、この評価式は \fIx\fP または \fIy\fP が NaN の場合に true +となるためである。 +.TP +\fBisunordered\fP() +引き数が unordered かどうか、つまり引き数の少なくとも一方が NaN かどうか を判定する。 +.SH 返り値 +\fBisunordered\fP() 以外のマクロは関係操作の結果を返す。 一方の引き数が NaN の場合、これらのマクロは 0 を返す。 -.\"O .BR isunordered () -.\"O returns 1 if \fIx\fP or \fIy\fP is NaN and 0 otherwise. -.BR isunordered () -¤Ï \fIx\fP ¤« \fIy\fP ¤¬ NaN ¤Î¾ì¹ç 1 ¤ò¡¢ -¤½¤ì°Ê³°¤Î¾ì¹ç 0 ¤òÊÖ¤¹¡£ -.\"O .SH ERRORS -.SH ¥¨¥é¡¼ -.\"O No errors occur. -¥¨¥é¡¼¤ÏȯÀ¸¤·¤Ê¤¤¡£ -.\"O .SH "CONFORMING TO" -.SH ½àµò -C99, POSIX.1-2001. -.\"O .SH NOTES -.SH Ãí°Õ -.\"O Not all hardware supports these functions, -.\"O and where hardware support isn't provided, they will be emulated by macros. -.\"O This will result in a performance penalty. -¤³¤ì¤é¤Î´Ø¿ô¤ÏÁ´¤Æ¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£ -¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥Þ¥¯¥í¤Ç¥¨¥ß¥å¥ì¡¼¥È¤µ¤ì¤ë¡£ -¥¨¥ß¥å¥ì¡¼¥È¤µ¤ì¤ë¾ì¹ç¤Ï¡¢À­Ç½¾å¤Ç¤ÎÉÔÍø¤È¤Ê¤ë¡£ -.\"O Don't use these functions if NaN is of no concern for you. -NaN ¤Ë¤Ä¤¤¤Æ¿´ÇÛ¤·¤Ê¤¯¤Æ¹½¤ï¤Ê¤¤¾ì¹ç¤Ï¡¢ -¤³¤ì¤é¤Î´Ø¿ô¤ò»È¤ï¤Ê¤¤¤³¤È¡£ -.\"O .SH "SEE ALSO" -.SH ´ØÏ¢¹àÌÜ -.BR fpclassify (3), -.BR isnan (3) +\fBisunordered\fP() は \fIx\fP か \fIy\fP が NaN の場合 1 を、 それ以外の場合 0 を返す。 +.SH エラー +エラーは発生しない。 +.SH 準拠 +C99, POSIX.1\-2001. +.SH 注意 +これらの関数は全てのハードウェアでサポートされているわけではない。 サポートされていない場合は、マクロでエミュレートされる。 +エミュレートされる場合は、性能上での不利となる。 NaN について心配しなくて構わない場合は、 これらの関数を使わないこと。 +.SH 関連項目 +\fBfpclassify\fP(3), \fBisnan\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。