#include <bits/stdc++.h>
using namespace std;
template <class _T>
inline _T sqr(const _T& x) {
  return x * x;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
struct tp {
  long double x, y;
};
inline long double dist(tp p) { return sqrt(p.x * p.x + p.y * p.y); }
inline long double dist(tp p1, tp p2) {
  return sqrt(sqr(p1.x - p2.x) + sqr(p1.y - p2.y));
}
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  cerr << setiosflags(ios::fixed) << setprecision(5);
  int qq;
  scanf("%d", &qq);
  while (qq--) {
    int r1, r2, k;
    scanf("%d%d%d", &r1, &r2, &k);
    long double r = r2 * 1.0 / r1;
    printf("%0.7lf\n",
           (double)(r1 * (1.0 - r) * r / (k * k * (1.0 - r) * (1.0 - r) + r)));
  }
  return 0;
}
