Welcome to ZOJ
 Contests Information Problems Runs Statistics Ranklist Clarification
48 - ZOJ Monthly, November 2005 - 1007
Bessel Function

Time Limit: 2 Seconds      Memory Limit: 32768 KB

Bessel function is one of the most important special functions in the field of physics. Many solutions of various physical phenomena have the form of this function. In mathematic notation, this function is deduced from the following differential equation:

There are two classes of solution of the above equation. One class of the solution (which is called the first kind of Bessel function) has the following image:

Because of its importance in the physics and it cannot be expressed by elementary functions, many formulas are deduced to numerically calculate it. The following integral is one of them.

Now you are asked to calculate Bessel function of the first kind using the above integral.

Input:

The input consists multiple test cases. In each test case, there are two numbers in one line, indicating the n and z in the above integral. (0<=n<=20, 0<=z<=20.0)

Output:

For each case, just output Jn(z). You must accurate the result up to 6 digits.

Sample Input:
```0 0.00
10 11.11
20 19.99
```
Sample Output:
```1.000000
0.286025
0.164206
```

Author: FAN, Xiang

Submit    Status