/* bad_roundoff.c remember 0.1 can not be exactly stored in binary */ /* each additional use makes it worse! */ #include double h=0.1; /* approximate */ int n3=3; /* there are exact */ int n80000=80000; int n10000=10000; int main(int argc, char *argv[]) { double h4 = h; double h0001 = 0.0001; double abad = 0.0; double agood = 0.0; int i; printf("bad_roundoff.c running \n\n"); for(i=0; i