#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops", \
                     "omit-frame-pointer", "inline")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,fma,tune=native")
#pragma GCC option("arch=native", "no-zero-upper")
using namespace std;
const long long mod = (long long)(1e9 + 7);
const long double eps = (1e-9);
const long long oo = (long long)(1e18);
long double l, r1, r2;
complex<long double> c1, c2;
complex<long double> operator*(long double x, complex<long double> p) {
  return complex<long double>(x * p.real(), x * p.imag());
}
void print(complex<long double> p) {
  cout << p.real() << ' ' << p.imag() << '\n';
}
void solve(long double k) {
  long double cnt = 1e4;
  complex<long double> center = complex<long double>(-l, 0);
  complex<long double> p1 = c1 - center;
  complex<long double> p2 = c2 - center;
  complex<long double> pp1 = complex<long double>(l, 0) - center;
  complex<long double> pp2 =
      ((r2 / (r1 + r2)) * c1) + ((r1 / (r1 + r2)) * c2) - center;
  complex<long double> ip1 = (cnt / (abs(pp1) * abs(pp1))) * pp1;
  complex<long double> ip2 = (cnt / (abs(pp2) * abs(pp2))) * pp2;
  complex<long double> add = complex<long double>(0, 1) * (ip1 - ip2);
  ip1 = ip1 + k * add;
  ip2 = ip2 + (k - 1) * add;
  complex<long double> ip3 = 0.5 * (ip1 + ip2);
  ip2 = ip2 + add;
  ip1 = (cnt / (abs(ip1) * abs(ip1))) * ip1;
  ip2 = (cnt / (abs(ip2) * abs(ip2))) * ip2;
  ip3 = (cnt / (abs(ip3) * abs(ip3))) * ip3;
  long double a = abs(ip1 - ip2);
  long double b = abs(ip2 - ip3);
  long double c = abs(ip3 - ip1);
  long double sp = (a + b + c) / 2;
  ip3 = ip3 + center;
  r2 = (a * b * c) / (sqrt(sp * (sp - a) * (sp - b) * (sp - c)) * 4);
  c2 = c1 + ((r1 + r2) / (abs(ip3 - c1))) * (ip3 - c1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int k;
    cin >> l >> r1 >> k;
    r2 = l - r1;
    c1 = complex<long double>(-l + r1, 0);
    c2 = complex<long double>(l - r2, 0);
    solve(k);
    cout.precision(10);
    cout << fixed;
    cout << r2 << '\n';
  }
  return 0;
}
