math: fix frexp (don't check iptr when it's not specified)
[libc-test] / src / math / util.h
index 50b923a..d84b0e3 100644 (file)
@@ -81,6 +81,15 @@ struct li_l {POS int r; long double x; long long i; long double y; float dy; int
 struct d_i {POS int r; double x; long long i; int e; };
 struct f_i {POS int r; float x; long long i; int e; };
 struct l_i {POS int r; long double x; long long i; int e; };
+struct d_dd {POS int r; double x; double y; float dy; double y2; float dy2; int e; };
+struct f_ff {POS int r; float x; float y; float dy; float y2; float dy2; int e; };
+struct l_ll {POS int r; long double x; long double y; float dy; long double y2; float dy2; int e; };
+struct ff_fi {POS int r; float x; float x2; float y; float dy; long long i; int e; };
+struct dd_di {POS int r; double x; double x2; double y; float dy; long long i; int e; };
+struct ll_li {POS int r; long double x; long double x2; long double y; float dy; long long i; int e; };
+struct fff_f {POS int r; float x; float x2; float x3; float y; float dy; int e; };
+struct ddd_d {POS int r; double x; double x2; double x3; double y; float dy; int e; };
+struct lll_l {POS int r; long double x; long double x2; long double x3; long double y; float dy; int e; };
 #undef POS
 
 char *estr(int);
@@ -107,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;
+}
+