B.42. 比較関数

Table B.117. 表:比較関数

関数詳細
int isequal (float x, float y)
intn isequal (floatn x, floatn y)
int isequal (double x, double y)
longn isequal (doublen x, doublen y)
各要素にたいして、x == y
の比較をし、その結果を返します。
int isnotequal (float x, float y)
intn isnotequal (floatn x, floatn y)
int isnotequal (double x, double y)
longn isnotequal (doublen x, doublen y)

各要素にたいして、x != y
の比較をし、その結果を返します。
int isgreater (float x, float y)
intn isgreater (floatn x, floatn y)
int isgreater (double x, double y)
longn isgreater (doublen x, doublen y)
各要素にたいして、x > y
の比較をし、その結果を返します。
int isgreaterequal (float x, float y)
intn isgreaterequal (floatn x, floatn y)
int isgreaterequal (double x, double y)
longn isgreaterequal (doublen x, doublen y)
各要素にたいして、x >= y
の比較をし、その結果を返します。

int isless (float x, float y)
intn isless (floatn x, floatn y)
int isless (double x, double y)
longn isless (doublen x, doublen y)

各要素にたいして、x < y
の比較をし、その結果を返します。
int islessequal (float x, float y)
intn islessequal (floatn x, floatn y)
int islessequal (double x, double y)
longn islessequal (doublen x, doublen y)
各要素にたいして、x <= y
の比較をし、その結果を返します。

int islessgreater (float x, float y)
intn islessgreater (floatn x, floatn y)
int islessgreater (double x, double y)
longn islessgreater (doublen x, doublen y)

各要素にたいして、
(x < y) || (x > y)
の比較をし、その結果を返します。

int isfinite (float)
intn isfinite (floatn)
int isfinite (double)
longn isfinite (doublen)

有限値かテストをします。

int isinf (float)
intn isinf (floatn)
int isinf (double)
longn isinf (doublen)
無限大(正または負)
かテストをします。
int isnan (float)
intn isnan (floatn)
int isnan (double)
longn isnan (doublen)
NaNのテストをします。
int isnormal (float)
intn isnormal (floatn)
int isnormal (double)
longn isnormal (doublen)
正規値(0, 非正規化数,
無限大, NaN のいずれでもない)か
テストします。
int isordered (float x, float y)
intn isordered (floatn x, floatn y)
int isordered (double x, double y)
longn isordered (doublen x, doublen y)

isequal(x, x) &&
isequal(y, y)の計算をします。

int isunordered (float x, float y)
intn isunordered (floatn x, floatn y)
int isunordered (double x, double y)
longn isunordered (doublen x, doublen y)

xまたはyがNaNのときはゼ
ロ以外、それ以外は0を返します。

int signbit (float)
intn signbit (floatn)
int signbit (double)
longn signbit (doublen)
符号ビットをテストします。
符号ビットが設定されていると
きはゼロ以外、それ以外のとき
は0を返します。

符号ビットを検査します。符号
ビットが設定されているときは
非ゼロを、そうでないときは
0 を返します。

int any (igentype x)
引数xのどれかの要素の最上位
ビットが設定されているとき
は1、それ以外のときは0を
返します。

int all (igentype x)

引数xの全ての要素の最上位
ビットが設定されていると
きは1、それ以外のときは
0を返します。


gentype bitselect (gentype a, gentype b, gentype c)
戻り値のビットを以下の
条件で設定します。
cの対応するビットが0の
ときは、aのビット
それ以外のときは、bのビット
gentype select (gentype a, gentype b,
igentype c)
gentype select (gentype a, gentype b,
ugentype c)

ベクトル型のとき、
「result[i] = c[i]の最
上位ビットが設定 result[i] ?
b[i] : a[i]」を計算します。
スカラ型のときは、「result =
c ? b : a」を計算します。

Copyright 2018-2019, by Masaki Komatsu