#include <math.h>
#include <stdio.h>
void print(double x);
int main(void) {
print(-1234.5678);
printf("%f\n", 10000000000000.0); print(10000000000000.0);
printf("%f\n", 99999999999999.0); print(99999999999999.0);
print(0.0000001);
print(0.000001);
printf("%f\n", 0.99999999999999); print(0.99999999999999);
return 0;
}
void print(double x) {
double y, z;
int d, ds[64];
int i;
if (x < 0.0) {
}
z = y;
for (i = 0;; ++i) {
ds[i] = (int)fmod(z, 10.0);
z /= 10.0;
if (z < 1.0) {
break;
}
}
for (; i >= 0; --i) {
}
z = y;
for (;;) {
z *= 10.0;
d = (int)fmod(z, 10.0);
z = fmod(z, 1.0);
if (z < 0.00000000000001) {
break;
}
}
}
I2luY2x1ZGUgPG1hdGguaD4KI2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHByaW50KGRvdWJsZSB4KTsKCmludCBtYWluKHZvaWQpIHsKCXByaW50ZigiJWZcbiIsIC0xMjM0LjU2NzgpOwoJcHJpbnQoLTEyMzQuNTY3OCk7CglwcmludGYoIiVmXG4iLCAxMDAwMDAwMDAwMDAwMC4wKTsKCXByaW50KDEwMDAwMDAwMDAwMDAwLjApOwoJcHJpbnRmKCIlZlxuIiwgOTk5OTk5OTk5OTk5OTkuMCk7CglwcmludCg5OTk5OTk5OTk5OTk5OS4wKTsKCXByaW50ZigiJWZcbiIsIDAuMDAwMDAwMSk7CglwcmludCgwLjAwMDAwMDEpOwoJcHJpbnRmKCIlZlxuIiwgMC4wMDAwMDEpOwoJcHJpbnQoMC4wMDAwMDEpOwoJcHJpbnRmKCIlZlxuIiwgMC45OTk5OTk5OTk5OTk5OSk7CglwcmludCgwLjk5OTk5OTk5OTk5OTk5KTsKCXJldHVybiAwOwp9Cgp2b2lkIHByaW50KGRvdWJsZSB4KSB7Cglkb3VibGUgeSwgejsKCWludCBkLCBkc1s2NF07CglpbnQgaTsKCQoJaWYgKHggPCAwLjApIHsKCQlwdXRjaGFyKCctJyk7Cgl9CgkKCXkgPSBmYWJzKHgpOwoJei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