#include <bits/stdc++.h>
using namespace std;
double R, r, K;
inline double sqr(double x) { return x * x; }
struct Tpnt {
  double x, y;
  Tpnt(double _x = 0, double _y = 0) { x = _x, y = _y; }
  inline Tpnt operator*(double k) const { return Tpnt(x * k, y * k); }
  inline double dist(const Tpnt &b) const {
    return sqrt(sqr(x - b.x) + sqr(y - b.y));
  }
};
namespace Nmain {
void solve() {
  cin >> R >> r >> K;
  Tpnt O((r + R) * .25 / r / R, K * (R - r) * .5 / R / r);
  double d = Tpnt().dist(O), x = (R - r) * .25 / R / r;
  Tpnt A = O * ((d + x) / d), B = O * ((d - x) / d);
  printf("%.10lf\n", A.dist(B) / Tpnt().dist(A) / Tpnt().dist(B) * .5);
}
}  // namespace Nmain
int main() {
  int tt;
  for (cin >> tt; tt; --tt) Nmain::solve();
  return 0;
}
