#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 */
double fabs(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, ...);
int /*<<< orphan*/ scanf(char *, ...);
double sqrt(double);
int main() {
  int tcase, tc = 1;
  double u, v, d, t1, t2, td;
  scanf("%d", &tcase);
  while (tcase--) {
    scanf("%lf%lf%lf", &d, &v, &u);
    if (v == 0 || u == 0 || v >= u) {
      printf("Case %d: can't determine\n", tc++);
      continue;
    }
    t1 = d / u;
    t2 = d / sqrt((u * u - v * v));
    td = fabs(t2 - t1);
    printf("Case %d: %.3lf\n", tc++, td);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     128d <main+0x15d>
lea    0xea0(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11a3 <main+0x73>
jp     11a3 <main+0x73>
jmp    11d0 <main+0xa0>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11c0 <main+0x90>
jp     11c0 <main+0x90>
jmp    11d0 <main+0xa0>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     11ee <main+0xbe>
mov    -0xc(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1158 <main+0x28>
movsd  -0x28(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movaps 0xd9f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    0xdb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0x4(%rsp)
jae    1169 <main+0x39>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebx
lea    0xe9e(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0x18(%rsp),%r13
lea    0xe92(%rip),%rbp
jmp    11a6 <main+0x76>
nopl   (%rax)
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
subl   $0x1,0x4(%rsp)
jb     1158 <main+0x28>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    11cb <main+0x9b>
jnp    1190 <main+0x60>
movsd  0x18(%rsp),%xmm4
ucomisd %xmm2,%xmm4
jne    11d9 <main+0xa9>
jnp    1190 <main+0x60>
ucomisd %xmm4,%xmm1
jae    1190 <main+0x60>
movsd  0x8(%rsp),%xmm3
mulsd  %xmm1,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1210 <main+0xe0>
sqrtsd %xmm0,%xmm0
jmp    122d <main+0xfd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm3,0x30(%rsp)
movapd %xmm4,0x20(%rsp)
call   1050 <sqrt@plt>
movapd 0x20(%rsp),%xmm4
movapd 0x30(%rsp),%xmm3
unpcklpd %xmm3,%xmm3
unpcklpd %xmm4,%xmm0
divpd  %xmm0,%xmm3
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
subsd  %xmm0,%xmm3
andpd  0xdb3(%rip),%xmm3
lea    0xde3(%rip),%rdi
mov    %ebx,%esi
movapd %xmm3,%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
jmp    119c <main+0x6c>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"%lf%lf%lf\00"
@.str.2 = [26 x i8] c"Case %d: can't determine\0A\00"
@.str.3 = [16 x i8] c"Case %d: %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast i32* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, -1
store i32 %11, i32* %1
%12 = icmp eq i32 %10, 0
br i1 %12, label %46, label %13
13: ; preds = %0, %25
%14 = phi i32 [ %26, %25 ], [ 1, %0 ]
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double* %4, double* %3, double* %2)
%16 = load double, double* %3
%17 = fcmp une double %16, 0.000000e+00
%18 = load double, double* %2
%19 = fcmp une double %18, 0.000000e+00
%20 = select i1 %17, i1 %19, i1 false
%21 = fcmp ult double %16, %18
%22 = select i1 %20, i1 %21, i1 false
br i1 %22, label %30, label %23
23: ; preds = %13
%24 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %14)
br label %25
25: ; preds = %23, %30
%26 = add nuw nsw i32 %14, 1
%27 = load i32, i32* %1
%28 = add nsw i32 %27, -1
store i32 %28, i32* %1
%29 = icmp eq i32 %27, 0
br i1 %29, label %46, label %13
30: ; preds = %13
%31 = load double, double* %4
%32 = fneg double %16
%33 = fmul double %16, %32
%34 = call double @llvm.fmuladd.f64(double %18, double %18, double %33)
%35 = call double @sqrt(double %34)
%36 = insertelement <2 x double> poison, double %31, i64 0
%37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> zeroinitializer
%38 = insertelement <2 x double> poison, double %35, i64 0
%39 = insertelement <2 x double> %38, double %18, i64 1
%40 = fdiv <2 x double> %37, %39
%41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%42 = fsub <2 x double> %40, %41
%43 = extractelement <2 x double> %42, i64 0
%44 = call double @llvm.fabs.f64(double %43)
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %14, double %44)
br label %25
46: ; preds = %25, %0
ret i32 0
}