#include <bits/stdc++.h>
int main() {
  int t, R, r, k;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &R, &r, &k);
    double d = (R - r) / 4. / R / r, x = (R + r) / 4. / R / r, y = d * k * 2,
           z = sqrt(x * x + y * y);
    double x1 = x - d * x / z, y1 = y - d * y / z, z1 = x1 * x1 + y1 * y1;
    double x2 = x + d * x / z, y2 = y + d * y / z, z2 = x2 * x2 + y2 * y2;
    x1 /= z1, y1 /= z1, x2 /= z2, y2 /= z2, x1 -= x2, y1 -= y2;
    printf("%.9lf\n", sqrt(x1 * x1 + y1 * y1) / 2);
  }
  return 0;
}
