#include <bits/stdc++.h>
using namespace std;
int main() {
  double R, r, k;
  int tt;
  scanf("%d", &tt);
  while (tt--) {
    scanf("%lf%lf%lf", &R, &r, &k);
    double a = (R + r) / (4 * R * r), b = k * (R - r) / (2 * R * r);
    double t = (R - r) / (4 * R * r);
    double s = t / (a * a + b * b - t * t);
    printf("%.9lf\n", s);
  }
  return 0;
}
