/* error_overflow3.c オーバーフロー (((2^2)^2)^2)^2 ... */ #include int main() { int i; double x = 2.0; printf("初期値 = %e\n", x); for(i = 1; i <= 10; i++){ x = x * x; printf("その2乗 = %e\n", x); } } /* 初期値 = 2.000000e+00 その2乗 = 4.000000e+00 その2乗 = 1.600000e+01 その2乗 = 2.560000e+02 その2乗 = 6.553600e+04 その2乗 = 4.294967e+09 その2乗 = 1.844674e+19 その2乗 = 3.402824e+38 その2乗 = 1.157921e+77 その2乗 = 1.340781e+154 その2乗 = inf */