isgreaterequal
From cppreference.net
Common mathematical functions
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ヘッダーで定義
<math.h>
|
||
|
#define isgreaterequal(x, y) /* implementation defined */
|
(C99以降) | |
浮動小数点数 x が浮動小数点数 y 以上であるかどうかを判定します。浮動小数点例外を設定しません。
目次 |
パラメータ
| x | - | 浮動小数点値 |
| y | - | 浮動小数点値 |
戻り値
x >= y の場合、非ゼロの整数値、 0 それ以外の場合。
注記
組み込みの operator >= は、引数の一方または両方がNaNの場合、 FE_INVALID を発生させる可能性があります。この関数は operator >= の「quiet」バージョンです。
例
このコードを実行
#include <math.h> #include <stdio.h> int main(void) { printf("isgreaterequal(2.0,1.0) = %d\n", isgreaterequal(2.0, 1.0)); printf("isgreaterequal(1.0,2.0) = %d\n", isgreaterequal(1.0, 2.0)); printf("isgreaterequal(1.0,1.0) = %d\n", isgreaterequal(1.0, 1.0)); printf("isgreaterequal(INFINITY,1.0) = %d\n", isgreaterequal(INFINITY, 1.0)); printf("isgreaterequal(1.0,NAN) = %d\n", isgreaterequal(1.0, NAN)); return 0; }
出力例:
isgreaterequal(2.0,1.0) = 1 isgreaterequal(1.0,2.0) = 0 isgreaterequal(1.0,1.0) = 1 isgreaterequal(INFINITY,1.0) = 1 isgreaterequal(1.0,NAN) = 0
参考文献
- C23規格 (ISO/IEC 9899:2024):
-
- 7.12.14.2 isgreaterequalマクロ (p: TBD)
-
- F.10.11 比較マクロ (p: TBD)
- C17 standard (ISO/IEC 9899:2018):
-
- 7.12.14.2 The isgreaterequal macro (p: TBD)
-
- F.10.11 Comparison macros (p: TBD)
- C11規格 (ISO/IEC 9899:2011):
-
- 7.12.14.2 isgreaterequalマクロ (p: 259-260)
-
- F.10.11 比較マクロ (p: 531)
- C99規格 (ISO/IEC 9899:1999):
-
- 7.12.14.2 isgreaterequalマクロ (p: 240-241)
関連項目
|
(C99)
|
第1浮動小数点引数が第2引数以下かどうかをチェックする
(関数マクロ) |
|
C++ documentation
for
isgreaterequal
|
|