/* power_of2.c print power of 2 tree */ /* compile gcc -m64 -o power_of2 power_of2.c */ /* power_of2 > power_of2.out edit to power_of2e.out */ #include int main(int argc, char *argv[]) { int n; long n2; double nf; n2=1L; nf=1.0; for(n=0; n<64; n++) { printf("%19ld %2d %58.56f\n", n2, n, nf); n2 = n2*2L; nf = nf/2.0; } }