1 #include <cmath>
2 #include <cstdio>
3 using namespace std;
4
5 const double EPS=1e-8;
6 double H,h,D;
7
8 double Calc(double x)
9 {
10 return (h*D-H*x)/(D-x)+x;
11 }
12
13 int main()
14 {
15 int T;
16 scanf("%d",&T);
17 while(T--)
18 {
19 scanf("%lf%lf%lf",&H,&h,&D);
20 double left=0,right=h*D/H;
21
22 while(right-left>=EPS)
23 {
24 double mid=(right+left)/2;
25 double midmid=(mid+right)/2;
26
27 double l1=Calc(mid);
28 double l2=Calc(midmid);
29 if(l1>l2)
30 right=midmid;
31 else
32 left=mid;
33 }
34 printf("%.3lf\n",Calc(left));
35 }
36 return 0;
37 }