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