final double EPSILON=1.0e-9; int n=0; double x=1.0; do { x = x / 2; System.out.printf("1/2の%d乗: %.15e%n", ++n, x); } while (x>=EPSILON); System.out.printf("⇒ 1/2の%d乗は%.1eより小さい。%n", n, EPSILON);