norad
12-18-2002, 07:53 AM
Hi!
I used the code from numerical recipes in C to calculate the modified Bessel function of fractional order K_2/3(x). However, when I plot the graph of the function based on the calculated values, I get a discontinuity at x=2.0. Here are the values:
X -> K_2/3(X)
1.980000 -> 0.118356
1.990000 -> 0.116443
2.000000 -> 0.124839
2.010000 -> 0.123268
2.020000 -> 0.121719
2.030000 -> 0.120191
2.040000 -> 0.118683
2.050000 -> 0.117196
2.060000 -> 0.115730
2.070000 -> 0.114283
2.080000 -> 0.112855
As you can see at 2.0 the function jumps from 0.116 to 0.124.
I checked the code twice. There are no typing errors (however I will check it again just to be sure)! I also compared the C code with the Fortran code. They are identical (in what the algorithm and numbers are concerned)!
Can anyone confirm this discontinuity?
Thank you in advance!
Norbert
P.S. I also checked the values with Maple, and in the 0-2 range they are slightly off, hovever in the 3-4 range they are almost identical.
I used the code from numerical recipes in C to calculate the modified Bessel function of fractional order K_2/3(x). However, when I plot the graph of the function based on the calculated values, I get a discontinuity at x=2.0. Here are the values:
X -> K_2/3(X)
1.980000 -> 0.118356
1.990000 -> 0.116443
2.000000 -> 0.124839
2.010000 -> 0.123268
2.020000 -> 0.121719
2.030000 -> 0.120191
2.040000 -> 0.118683
2.050000 -> 0.117196
2.060000 -> 0.115730
2.070000 -> 0.114283
2.080000 -> 0.112855
As you can see at 2.0 the function jumps from 0.116 to 0.124.
I checked the code twice. There are no typing errors (however I will check it again just to be sure)! I also compared the C code with the Fortran code. They are identical (in what the algorithm and numbers are concerned)!
Can anyone confirm this discontinuity?
Thank you in advance!
Norbert
P.S. I also checked the values with Maple, and in the 0-2 range they are slightly off, hovever in the 3-4 range they are almost identical.