#include <bits/stdc++.h>
using namespace std;
long double sqr2(long double x, long double y) { return x * x + y * y; }
void inverse(long double& x, long double& y) {
  if (fabs(y) < 1e-6) {
    y = 0;
    x = 1 / x;
  } else {
    long double d = sqr2(x, y);
    x /= d;
    y = -y / d;
  }
}
int main() {
  int numTests;
  cin >> numTests;
  for (int it = 0; it < numTests; ++it) {
    long double R, r;
    cin >> R >> r;
    int k;
    cin >> k;
    cout.precision(10);
    double d = 4 * k * k + (R + r) * (R + r) / (R - r) / (R - r);
    cout << fixed << 4 * R * r / (R - r) / (d - 1) << endl;
  }
  return 0;
}
