mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
bruteforce: Check both input values for nan (#2270)
This commit is contained in:
committed by
GitHub
parent
bdd0eb0b7e
commit
32361e1d89
@@ -1641,6 +1641,7 @@ double reference_expm1(double x)
|
||||
double reference_fmax(double x, double y)
|
||||
{
|
||||
if (isnan(y)) return x;
|
||||
if (isnan(x)) return y;
|
||||
|
||||
return x >= y ? x : y;
|
||||
}
|
||||
@@ -1648,6 +1649,7 @@ double reference_fmax(double x, double y)
|
||||
double reference_fmin(double x, double y)
|
||||
{
|
||||
if (isnan(y)) return x;
|
||||
if (isnan(x)) return y;
|
||||
|
||||
return x <= y ? x : y;
|
||||
}
|
||||
@@ -3611,6 +3613,7 @@ long double reference_expm1l(long double x)
|
||||
long double reference_fmaxl(long double x, long double y)
|
||||
{
|
||||
if (isnan(y)) return x;
|
||||
if (isnan(x)) return y;
|
||||
|
||||
return x >= y ? x : y;
|
||||
}
|
||||
@@ -3618,6 +3621,7 @@ long double reference_fmaxl(long double x, long double y)
|
||||
long double reference_fminl(long double x, long double y)
|
||||
{
|
||||
if (isnan(y)) return x;
|
||||
if (isnan(x)) return y;
|
||||
|
||||
return x <= y ? x : y;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user