#include <bits/stdc++.h>
int r, R, k, TestCase;
double A, B, Y, Y1, Y2, K, D;
int main() {
  for (scanf("%d", &TestCase); TestCase--;) {
    scanf("%d%d%d", &r, &R, &k);
    A = 0.5 / r;
    B = 0.5 / R;
    Y = (B - A) * k;
    K = A * A + Y * Y;
    Y1 = Y / K;
    K = B * B + Y * Y;
    Y2 = Y / K;
    D = (Y1 - Y2) / (Y2 / R + Y1 / r);
    printf("%.8lf\n", D);
  }
  return 0;
}
