Zhang3 a participant of IPhO (Immortal Physics Olympiad). The 0th problem in the contest is as follows.
There are two balls that weigh a kg and b kg respectively. They can be regarded as particles in this problem, as they are small enough. At the very beginning (i.e. t=0), the distance between two balls is d km, and both of them are not moving.
Assuming that only gravitation works in this system (no other objects or other forces considered). The two balls has started moving since t=0. Your task is to calculate the distance between them when t=t0 (s).
Help Zhang3 solve the problem!
The following information might help when solving the problem.
The first line of the input gives the number of test cases T(1≤T≤100). Ttest cases follow.
For each test case, the only line contains four integers a,b,d,t0(1≤a,b,d,t0≤100), representing the mass of the two balls, the initial distance between them, and how much time the balls move.
It is guaranteed that two balls will not collide within (t0+1)seconds.
输出格式
For each test case, print a line with a real number x, representing that the distance is xkm.
Your answers should have absolute or relative errors of at most 10−6.