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