Evaluate for given values of by using the above expansion for the first terms.
The first line contains an integer , the number of test cases.
lines follow. Each line contains a value of for which you need to output the value of using the above series expansion. These input values have exactly decimal places each.
Output lines, each containing the value of , computed by your program.
Var, Val in Scala and def and defn in Clojure are blocked keywords. The challenge is to accomplish this without either mutable state or direct declaration of local variables.
The output has the computed values of corresponding to each test case. They are correct up to decimal places and on separate lines.
All test cases carry an equal weight in the final score. For your solution to pass a given test case, all the values of computed by you must be within of the expected answers. This tolerance level has been kept to account for slightly different answers across different languages.