#include <bits/stdc++.h>
using namespace std;
int T, k;
double r, R, c1, c2, c3, c4;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%lf%lf%d", &R, &r, &k);
    k--;
    c1 = 1.0 / (-R);
    c2 = 1.0 / r;
    c3 = 1.0 / (R - r);
    c2 = c1 + c2 + c3;
    c4 = c2 - c3;
    while (k--) c1 = c3, c3 = c2, c2 = 2.0 * (c4 + c3) - c1;
    printf("%0.10lf\n", 1.0 / c2);
  }
}
