This problem is a programming version of Problem 235 from projecteuler.net
Given is the arithmetic-geometric sequence .
Let .
Find the value of for which .
Give your answer rounded to places behind the decimal point.
Input Format
First line of each test file contains a single integer which is the number of queries per test file. lines follow, each containing exactly four integers separated by single spaces which are , , and .
Constraints
Output Format
Print exactly numbers on the separate lines that are the 's for the corresponding tests. Your answers will be considered as correct if they coincide with the author's ones in digits after the decimal point.
Sample Input 0
1
1 1 3000 100000000
Sample Output 0
1.00136521495144