Convoluted Expression
Description
One of your engineer friends says that he has to do a lot of long tedious calculations and that he would appreciate it if you wrote a program to do it for him. He gives you the expression below.
The expression is so convoluted and seemingly irrelevant that you begin to wonder if your friend is really an engineer. You decide to the write the program anyway.
Note: The cosine function in this expression uses degrees.
Input
The first line contains a single integer , the number of calculations to be done. lines follow, each with two integers, and , respectively. You may assume that no calculation will result in an undefined value.
Output
For each test case, output a line containing rounded to 8 decimal places.
Sample Input
3
32 2
5 1
3 4
Sample Output
0.06180906
0.09990717
0.11960703