math: do correctly rounded checks where it's appropriate
[libc-test] / src / math / util.h
index 875203b..d84b0e3 100644 (file)
@@ -116,3 +116,10 @@ static int checkulp(float d, int r)
        return 1;
 }
 
+static int checkcr(long double y, long double ywant, int r)
+{
+       if (isnan(ywant))
+               return isnan(y);
+       return y == ywant;
+}
+