Mr. X is a dangerous criminal. He likes to draw some geometric random stuff and get motivated for his evil work.
FBI knows that MR. X is planning something new and he may sacrifice innocent people for his bloodlust. So they raided Mr. X's apartment, but found nothing except the following geometric drawing.
From the forensic department, we got the following information,
Initially there was only segment .
From point and (taking each as center) two circles were drawn with radius . Let's assume that these two circles intersect at points and .
Then segment was extended as long as it intersects the circle (centered at ) at point .
From the point , another circle was drawn taking as radius which intersects one of the circles at point .
segment intersects segment at point .
As a programmer and geometry lover you think, this holds the information about where the ritual will occur. So you are extracting information from the drawing.
In order to search the city database (maps and building planning), you need to know the length of . So each time you are given a value for and you need to calculate the value of .
Input starts with a positive integer (), denoting the number of test cases. Each case contains a floating point value () denoting the length of the segment .
For each case, print the length of . Errors less than will be ignored.
Input | Output |
---|---|
1 5 | 8.09016 |