#include <bits/stdc++.h>
using namespace std;
int T, k;
double r, R;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%lf%lf%d", &R, &r, &k);
    double rr = (1 / r - 1 / R) / 2;
    double x = (1 / r + 1 / R) / 2;
    double y = k * (1 / r - 1 / R);
    double dd = sqrt(x * x + y * y);
    double res = (1 / (dd - rr) - 1 / (dd + rr));
    printf("%.10f\n", res);
  }
  return 0;
}
