diff --git a/test_conformance/math_brute_force/reference_math.cpp b/test_conformance/math_brute_force/reference_math.cpp index acde1136..90b4adb4 100644 --- a/test_conformance/math_brute_force/reference_math.cpp +++ b/test_conformance/math_brute_force/reference_math.cpp @@ -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; }