#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, t;
  double rk, r1, dis, r2, r3, a, ans, tmp;
  scanf("%d", &t);
  while (t--) {
    cin >> r1 >> r2 >> k;
    r3 = r1 - r2;
    rk = r1 * r2 * 4;
    a = r3 * 2 * k;
    tmp = r1 + r2;
    dis = sqrt(a * a + tmp * tmp);
    ans = rk * r3 / (dis + r3) / (dis - r3);
    printf("%.7lf\n", ans);
  }
  return 0;
}
