#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  char zf = 1;
  char ch = getchar();
  while (ch != '-' && !isdigit(ch)) ch = getchar();
  if (ch == '-') zf = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * zf;
}
void write(long long y) {
  if (y < 0) putchar('-'), y = -y;
  if (y > 9) write(y / 10);
  putchar(y % 10 + 48);
}
void writeln(const long long y) {
  write(y);
  putchar('\n');
}
int m, n;
double k[10010], v;
int main() {
  for (register int T = read(); T; T--) {
    int R = read(), RR = read(), n = read() + 1;
    k[1] = 1.0 / (R - RR);
    v = 1.0 / RR - 1.0 / R;
    k[2] = k[1] + v;
    for (register int i = 3; i <= n; i++) k[i] = (k[i - 1] + v) * 2 - k[i - 2];
    printf("%.8f\n", 1.0 / k[n]);
  }
  return 0;
}
