#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897932384626433832795028L;
int main() {
  int N;
  cin >> N;
  while (N--) {
    long double R, r;
    int k;
    cin >> R >> r >> k;
    r = r / R;
    cout << fixed << setprecision(12)
         << 2 * R * (1 - r) * r / (2 * (k * k * (1 - r) * (1 - r) + r)) << endl;
  }
  return 0;
}
