program hungry;
uses math;
const
pi=3.141592653589793238462643;
var
i,k:longint;
t:longint;
l,s,d,j,m:extended;
area:extended;
tan,du:extended;
begin
assign(input,'hungry.in');
reset(input);
assign(output,'hungry.out');
rewrite(output);
readln(t);
for k:=1 to t do
begin
readln(l,d,s);
j:=sqrt(d*d+l*l/4);
if s<=d then
begin
area:=pi*s*s;
end
else
if s>=j then
begin
tan:=(l/2)/d;
du:=arctan(tan);
area:=pi*s*s*((pi-du)/pi);
du:=pi/2-du;
du:=pi-du;
area:=area+pi*sqr(s-j)*(du/pi);
area:=area+l*d/2;
if (s-j)>(l/2) then
begin
tan:=(l/2)/(s-j);
du:=arccos(tan);
m:=sqrt((s-j)*(s-j)-l*l/4);
area:=area-2*(pi*(s-j)*(s-j)*du/(pi*2)-l*m/4);
end;
end
else
begin
j:=sqrt(s*s-d*d);
tan:=j/d;
du:=arctan(tan);
area:=pi*s*s*((pi-du)/pi);
area:=area+j*d;
end;
writeln(area:0:2);
end;
close(input);
close(output);
end.