#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 scanf(char *, double *, ...);
double sqrt(double);
int main() {
  int n = 0;
  double Vs = 0.0, R = 0.0, C = 0.0, w = 0.0;
  if (4 != scanf("%lf %lf %lf %d", &Vs, &R, &C, &n))
    return 0;
  double R2C2 = R * R * C * C;
  for (int i = 0; i < n; i++) {
    if (1 != scanf("%lf", &w))
      return 0;
    printf("%.3f\n", Vs / sqrt(1.0 + 1.0 / (R2C2 * w * w)));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xe9b(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x8(%rbp),%r8
mov    $0x0,%al
call   1040 <scanf@plt>
mov    %eax,%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
je     119f <main+0x6f>
movl   $0x0,-0x4(%rbp)
jmp    125b <main+0x12b>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1254 <main+0x124>
lea    0xe45(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     11f8 <main+0xc8>
movl   $0x0,-0x4(%rbp)
jmp    125b <main+0x12b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xde7(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xddb(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
lea    0xdda(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11bf <main+0x8f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
movl   $0x0,0x4(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xea3(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x4(%rsp),%r8
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x4,%eax
jne    125a <main+0x12a>
cmpl   $0x0,0x4(%rsp)
jle    125a <main+0x12a>
movsd  0x18(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
lea    0xe5e(%rip),%r14
lea    0x8(%rsp),%rbx
lea    0xe56(%rip),%r15
xor    %ebp,%ebp
jmp    120a <main+0xda>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm3,0x28(%rsp)
call   1050 <sqrt@plt>
movsd  0x28(%rsp),%xmm3
divsd  %xmm0,%xmm3
mov    %r15,%rdi
movapd %xmm3,%xmm0
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jge    125a <main+0x12a>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    125a <main+0x12a>
movsd  0x20(%rsp),%xmm3
movsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xdc2(%rip),%xmm2
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ucomisd 0xdb6(%rip),%xmm0
jb     11e0 <main+0xb0>
sqrtsd %xmm0,%xmm0
jmp    11f1 <main+0xc1>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%lf %lf %lf %d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
%9 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double* %3, double* %4, double* %5, i32* %2)
%10 = icmp ne i32 4, %9
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 0, i32* %1
br label %44
12: ; preds = %0
%13 = load double, double* %4
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = load double, double* %5
%19 = fmul double %17, %18
store double %19, double* %7
store i32 0, i32* %8
br label %20
20: ; preds = %40, %12
%21 = load i32, i32* %8
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %43
24: ; preds = %20
%25 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%26 = icmp ne i32 1, %25
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 0, i32* %1
br label %44
28: ; preds = %24
%29 = load double, double* %3
%30 = load double, double* %7
%31 = load double, double* %6
%32 = fmul double %30, %31
%33 = load double, double* %6
%34 = fmul double %32, %33
%35 = fdiv double 1.000000e+00, %34
%36 = fadd double 1.000000e+00, %35
%37 = call double @sqrt(double %36)
%38 = fdiv double %29, %37
%39 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %38)
br label %40
40: ; preds = %28
%41 = load i32, i32* %8
%42 = add nsw i32 %41, 1
store i32 %42, i32* %8
br label %20
43: ; preds = %20
store i32 0, i32* %1
br label %44
44: ; preds = %43, %27, %11
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str = [15 x i8] c"%lf %lf %lf %d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%7 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%8 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%9 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%10 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%11 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4, i32* %1)
%12 = icmp eq i32 %11, 4
br i1 %12, label %13, label %38
13: ; preds = %0
%14 = load double, double* %3
%15 = fmul double %14, %14
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = fmul double %16, %17
%19 = load i32, i32* %1
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %38
21: ; preds = %13, %25
%22 = phi i32 [ %35, %25 ], [ 0, %13 ]
%23 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %38
25: ; preds = %21
%26 = load double, double* %2
%27 = load double, double* %5
%28 = fmul double %18, %27
%29 = fmul double %27, %28
%30 = fdiv double 1.000000e+00, %29
%31 = fadd double %30, 1.000000e+00
%32 = call double @sqrt(double %31)
%33 = fdiv double %26, %32
%34 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %33)
%35 = add nuw nsw i32 %22, 1
%36 = load i32, i32* %1
%37 = icmp slt i32 %35, %36
br i1 %37, label %21, label %38
38: ; preds = %21, %25, %13, %0
ret i32 0
}