blob: f1b240172d6784f4a7fad0a2ffb3fb49d44a7598 [file] [log] [blame]
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int res = 0;
int i;
for (i = 0; i < 5; i++)
{
double m;
#define TEST(y) do { \
m = fmod(1 << i, y); \
printf ("fmod(%d, "#y") = %.18f\n", 1 << i, m); \
if (m >= y) \
{ \
res |= 1; \
printf ("which is bogus!\n"); \
} \
} while (0)
TEST (0.05);
TEST (0.1);
TEST (0.5);
}
return res;
}