Welcome to ZOJ
Select Problem
ZOJ Problem Set - 2957
Concise mathematics problem

Time Limit: 2 Seconds      Memory Limit: 65536 KB

F0(x) = sin(x) / x
F1(x)= (sin(x) - x * cos(x)) / x / x
Fn+1(x) = (2 * n + 1) * Fn(x) / x - Fn-1(x)
You are to calculate Fn(x) for given n and x.


There are multiple test cases. Each test case consists of one line containing two numbers. The first number specifies n, a non-negative integer not more than 20. The second number specifies x, a positive real number between 0.10 and 20.00.


For each test case, output Fn(x), using scientific expression with four valid digits as the sample output. It is guaranteed that the exponentials of the answers are all negative.

Sample Input

3 10.0
5 1.00
8 0.10

Sample Output


Author: HE, Rongqiang
Source: ZOJ Monthly, May 2008
Submit    Status