#include <bits/stdc++.h>
using namespace std;
int T, R, r, k;
void solve() {
  scanf("%d%d%d", &R, &r, &k);
  double iv1 = 1.0 / r, iv4 = 1.0 / R, iv3 = 1.0 / (R - r),
         iv2 = iv1 + iv3 - iv4;
  for (int i = 1; i < k; i++) {
    double cur = 2 * (iv1 + iv2 - iv4) - iv3;
    iv3 = iv2;
    iv2 = cur;
  }
  printf("%.10lf\n", 1.0 / iv2);
}
int main() {
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
