}
#define D(fx, y) do{ \
- double yy = fx; \
+ volatile double yy = fx; \
+ volatile long double yl = fx; \
if (!check(yy, y)) \
error("%s got %a = %.21e want %a = %.21e\n", #fx, yy, yy, y, y); \
+ if (yy != yl) \
+ error("float-store issue: (double)%s = %a (long double)%s = %La\n", #fx, yy, #fx, yl); \
}while(0)
#define F(fx, y) do{ \
- float yy = fx; \
+ volatile float yy = fx; \
+ volatile long double yl = fx; \
if (!checkf(yy, y)) \
error("%s got %a = %.21e want %a = %.21e\n", #fx, yy, yy, y, y); \
+ if (yy != yl) \
+ error("float-store issue: (float)%s = %a (long double)%s = %La\n", #fx, yy, #fx, yl); \
}while(0)
#define L(fx, y) do{ \
error("%s got %lld want %lld\n", #fx, yy, y); \
}while(0)
-int test_math_sanity()
+void test_math_sanity()
{
int i;
double q;
F(y1f(0.7f), -0x1.1a6e96p+0);
D(yn(2, 0.7), -0x1.7b11b25df166ep+1);
F(ynf(2, 0.7f), -0x1.7b11b4p+1);
-
- return 0;
}