2019 is the death year of Roy Batty, the leader of the renegade Nexus-6 replicants of the cult film Blade Runner. Also, 2019 has been the death year of Rutger Hauer, the actor that so brillianty played the role of Roy Batty on film. That sad coincidence deserves a problem.
0.67 Roy Batty has died. A starship will transport his body from the Tannhäuser Gate to the shoulder of Orion. Assume a two-dimensional universe, centered at the middle of Orion. The shoulder of Orion orbits around its center as a circumference. Its position as a function of the time is . The Tannhäuser Gate is located at . The starship can freely change its speed and direction, with just one restriction: a maximum absolute speed of .
0.32
Your task is to compute the minimum time to transport Roy’s body from the Tannhäuser Gate to the shoulder of Orion. Consider all objects as points.
Input consists of several cases, each with four real numbers , , and . You can assume .
For each case, print the answer with four digits after the decimal point. The input cases have no precision issues.
Input
100 1356.6371 0 200 10 0 1000 100.5475 1 0 0 2 14.92 -15.75 38.83 18.87
Output
6.2832 10.0000 0.5000 1.5340