#include <bits/stdc++.h>
using std::cin;
const int fin = 0;
int main() {
  if (fin) {
    freopen("t.in", "r", stdin);
    freopen("t.out", "w", stdout);
  }
  int T;
  long double R, r, k, c, l;
  cin >> T;
  while (T--) {
    cin >> R >> r >> k;
    c = (1 / r - 1 / R) / 4;
    l = sqrt(((2 * k * c) * (2 * k * c)) + ((1 / R / 2 + c) * (1 / R / 2 + c)));
    printf("%.10lf\n", (double)(1 / (l - c) - 1 / (l + c)) / 2);
  }
  return 0;
}
