It is Argentina vs Croatia in the football world cup semifinal of 2022 in a parallel universe.
The football field can be considered as an infinite - dimensional plane. Lionel Messi of Argentina has the ball. He is at coordinate . Joško Gvardiol, a defender of Croatia is at . At any moment, Gvardiol runs directly towards Messi at speed unit per second. Messi knows the movement strategy of Gvardiol. Messi himself has a maximum speed of unit per second.
Gvardiol will tackle Messi if the distance between them becomes strictly less than unit. Gvardiol has a choice to foul Messi at a moment when Messi moves from a position which is more than 1 unit away to a position which is exactly unit away from Gvardiol. A dribble is a path on the field which Messi can take to move to coordinate without getting tackled or fouled.
Messi does not know if Gvardiol intends to foul or not. So to be safe, he plans his dribble assuming that Gvardiol will foul him given the chance.
A dribble is called boring if Messi can make a dribble shorter than if he knows beforehand that Gvardiol won’t foul.
Messi wants to know the length of the shortest dribble which is not boring. It can be proved that such a dribble exists under the given constraints.
First line contains an integer , the number of test cases.
Each of the next lines contains two space separated floating point numbers and . Both numbers have digits after decimal.
Print the answer for each case in a separate line. Your answer is considered correct if its absolute or relative error does not exceed . Formally, let your answer be , and the jury's answer be . Your answer is accepted if and only if .
Input | Output |
---|---|
2 2.50000 2.60000 10.00000 100.00000 | 4.374718737669 10.637610774649 |