#include <bits/stdc++.h>
using namespace std;
char buf[1 << 21], *p1 = buf, *p2 = buf;
__inline__ __attribute__((always_inline)) char getc() {
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
int read() {
  register int res;
  register char ch;
  while ((ch = getc()) > '9' || ch < '0')
    ;
  for (res = ch - '0'; (ch = getc()) >= '0' && ch <= '9';
       res = res * 10 + ch - '0')
    ;
  return res;
}
int n, R1, R2, R3;
double r1, r2, r3, r4, r5;
int main() {
  for (int T = read(); T; --T) {
    R1 = read(), R2 = read(), n = read(), R3 = R1 - R2;
    r1 = -1.0 / R1, r2 = 1.0 / R2, r3 = 1.0 / R3, r4 = r1 + r2 + r3;
    for (register int i = (2), I = (n) + 1; i < I; ++i)
      r5 = r3, r3 = r4, r4 = (r1 + r2 + r3) * 2 - r5;
    printf("%.10lf\n", 1.0 / r4);
  }
  return 0;
}
