#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 *, long long *, ...);
int main() {
  long long int n, a, b, c;
  double d;
  scanf("%lld", &n);
  while (n--) {
    scanf("%lld %lld %lld", &a, &b, &c);
    d = ((a + c) / 2.0) - b;
    if (d < 0)
      d *= -1;
    printf("%.2lf\n", d);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee4(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     11d2 <main+0xb2>
lea    0xeaf(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rax
add    -0x28(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xe77(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdq -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    11bc <main+0x9c>
movsd  0xe56(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xef6(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subq   $0x1,(%rsp)
jb     11df <main+0xbf>
lea    0xed0(%rip),%r14
lea    0x18(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
lea    0xec9(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%rax
add    0x18(%rsp),%rax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mulsd  0xe63(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq 0x10(%rsp),%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
xorpd  0xe59(%rip),%xmm2
movapd %xmm1,%xmm0
cmpltsd 0xe44(%rip),%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
subq   $0x1,(%rsp)
jae    1170 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [15 x i8] c"%lld %lld %lld\00"
@.str.2 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca double
store i32 0, i32* %1
%7 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %8
8: ; preds = %27, %0
%9 = load i64, i64* %2
%10 = add nsw i64 %9, -1
store i64 %10, i64* %2
%11 = icmp ne i64 %9, 0
br i1 %11, label %12, label %30
12: ; preds = %8
%13 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64* %3, i64* %4, i64* %5)
%14 = load i64, i64* %3
%15 = load i64, i64* %5
%16 = add nsw i64 %14, %15
%17 = sitofp i64 %16 to double
%18 = fdiv double %17, 2.000000e+00
%19 = load i64, i64* %4
%20 = sitofp i64 %19 to double
%21 = fsub double %18, %20
store double %21, double* %6
%22 = load double, double* %6
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %24, label %27
24: ; preds = %12
%25 = load double, double* %6
%26 = fmul double %25, -1.000000e+00
store double %26, double* %6
br label %27
27: ; preds = %24, %12
%28 = load double, double* %6
%29 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %28)
br label %8
30: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [15 x i8] c"%lld %lld %lld\00"
@.str.2 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %1 to i8*
%6 = bitcast i64* %2 to i8*
%7 = bitcast i64* %3 to i8*
%8 = bitcast i64* %4 to i8*
%9 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%10 = load i64, i64* %1
%11 = add nsw i64 %10, -1
store i64 %11, i64* %1
%12 = icmp eq i64 %10, 0
br i1 %12, label %30, label %13
13: ; preds = %0, %13
%14 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64* %2, i64* %3, i64* %4)
%15 = load i64, i64* %2
%16 = load i64, i64* %4
%17 = add nsw i64 %16, %15
%18 = sitofp i64 %17 to double
%19 = fmul double %18, 5.000000e-01
%20 = load i64, i64* %3
%21 = sitofp i64 %20 to double
%22 = fsub double %19, %21
%23 = fcmp olt double %22, 0.000000e+00
%24 = fneg double %22
%25 = select i1 %23, double %24, double %22
%26 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %25)
%27 = load i64, i64* %1
%28 = add nsw i64 %27, -1
store i64 %28, i64* %1
%29 = icmp eq i64 %27, 0
br i1 %29, label %30, label %13
30: ; preds = %13, %0
ret i32 0
}