#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int run, nruns;
  double x, y;
  double epsilon = 0.0001;
  scanf("%d\n", &nruns);
  for (run = 1; run <= nruns; run++) {
    scanf("%lf\n", &x);
    y = 1 / x + epsilon;
    epsilon /= 6;
    printf("%.7lf\n", y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xed5(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11bf <main+0x9f>
lea    0xeb4(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xe95(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe71(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xee7(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11b4 <main+0x94>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xec3(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xebc(%rip),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0xe83(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm0
divsd  0xe73(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
@.str.2 = [7 x i8] c"%.7lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 1.000000e-04, double* %6
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 1, i32* %2
br label %8
8: ; preds = %22, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %4)
%14 = load double, double* %4
%15 = fdiv double 1.000000e+00, %14
%16 = load double, double* %6
%17 = fadd double %15, %16
store double %17, double* %5
%18 = load double, double* %6
%19 = fdiv double %18, 6.000000e+00
store double %19, double* %6
%20 = load double, double* %5
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %8
25: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
@.str.2 = [7 x i8] c"%.7lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %20, label %8
8: ; preds = %0, %8
%9 = phi double [ %15, %8 ], [ 1.000000e-04, %0 ]
%10 = phi i32 [ %17, %8 ], [ 1, %0 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %2)
%12 = load double, double* %2
%13 = fdiv double 1.000000e+00, %12
%14 = fadd double %9, %13
%15 = fdiv double %9, 6.000000e+00
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %14)
%17 = add nuw nsw i32 %10, 1
%18 = load i32, i32* %1
%19 = icmp slt i32 %10, %18
br i1 %19, label %8, label %20
20: ; preds = %8, %0
ret i32 0
}