#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 *, float);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int t, a, b, c;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &a, &b, &c);
    float ans, a1, c1;
    a1 = a;
    c1 = c;
    ans = ((a1 + c1) / 2) - b;
    if (ans >= 0)
      printf("%.2f\n", (ans));
    else
      printf("%.2f\n", -ans);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%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     11f1 <main+0xd1>
lea    0xea8(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  0xe6b(%rip),%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11ce <main+0xae>
movss  -0x18(%rbp),%xmm0
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
jmp    11ec <main+0xcc>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xef0(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,(%rsp)
jb     11d7 <main+0xb7>
lea    0xed1(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%r13
lea    0xec2(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssl 0x4(%rsp),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ssl 0x8(%rsp),%xmm0
mulss  0xe56(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm2
xorps  0xe58(%rip),%xmm2
xorps  %xmm0,%xmm0
cmpnless %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
subl   $0x1,(%rsp)
jae    1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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