Bessel function gving the same value for different arguments


tocotoco
03-20-2008, 10:26 AM
I found a problem using the bessel routine jn. For arguments larger than ~7.5 the function returns the same value for several arguments and changes the return value in jumps. Please see the graph below showing a plot of the output values.

What could be wrong ?. I used the bessel routines from previous numerical recipes in C and they seemed to work OK.

Thanks,

C:\Data_1_graph.jpg

Saul Teukolsky
03-20-2008, 11:03 AM
Hi,

Can you please say which version you were using, eg. C++ 3rd edition. Also, please give a value of n, and a couple of values of x that show the problem.

Thanks.
Saul Teukolsky