#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(32);
  int t;
  cin >> t;
  while (t--) {
    int k;
    long double r, R;
    cin >> R >> r >> k;
    long double rR = r / R;
    long double ans = (1 - rR) * rR / (rR + (1 - rR) * (1 - rR) * k * k);
    ans *= R;
    cout << ans << '\n';
  }
  return 0;
}
