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