#include <bits/stdc++.h>
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    double R, r, x, y, ans, k, inver, r0;
    scanf("%lf%lf%lf", &R, &r, &k);
    x = (r + R) / (4 * r * R);
    inver = (R - r) / (4 * r * R);
    y = k * 2 * inver;
    r0 = sqrt(x * x + y * y);
    ans = 1 / (r0 - inver) - 1 / (r0 + inver);
    printf("%.10f\n", ans / 2);
  }
}
