#include <bits/stdc++.h>
using namespace std;
int t, k;
double R, r;
double iR, ir;
int main() {
  cin >> t;
  while (t--) {
    cin >> R >> r >> k;
    iR = 1 / R / 2;
    ir = 1 / r / 2;
    double x = (ir + iR) / 2;
    double u = (ir - iR) / 2;
    double y = k * 2 * u;
    double d1 = hypot(x, y) - u;
    double d2 = hypot(x, y) + u;
    double ans = (1 / d1 - 1 / d2) / 2;
    printf("%.9f\n", ans);
  }
}
