#include <bits/stdc++.h>
using namespace std;
int main() {
  int Test;
  scanf("%d", &Test);
  while (Test--) {
    double R, r;
    int K;
    scanf("%lf%lf%d", &R, &r, &K);
    double T = (R - r) / (4 * R * r);
    double X = (R + r) / (4 * R * r);
    double Y = (R - r) / (2 * R * r) * K;
    printf("%0.10lf\n", T / (X * X + Y * Y - T * T));
  }
  return 0;
}
