#include <bits/stdc++.h>
int main() {
  int t, k;
  double R, r, x, d, y;
  for (scanf("%d", &t); t; t--) {
    scanf("%lf%lf%d", &R, &r, &k);
    R = 1 / R, r = 1 / r;
    x = 0.25 * (R + r), d = 0.25 * (r - R);
    y = 2 * k * d;
    printf("%.15lf\n", d / (x * x + y * y - d * d));
  }
  return 0;
}
