Hello Robert,
I have checked again the numerical values for the tests. The values are equal to
the values from functions.wolfram.com.
This is part of the code in bessel-i that produces all three errors :
...
(let* ((arg (float arg))
(result (* (expt arg order)
(expt (complex 0 arg) (- order))
(bessel-j order (complex 0 arg))))
....
GCL get the correct results. But perhaps the following two things are
responsible:
1. No declaration of order as a float value
2. No float declaration of the realpart in the complex values.
Perhaps the following code does it better:
(let* ((arg (float arg)
(order (float order)))
(result (* (expt arg order)
(expt (complex 0.0 arg) (- order))
(bessel-j order (complex 0.0 arg))))
...
I don't see more possibilities because the bessel-j code seems to work and there
is only the Lisp function expt which hopefully works for other compilers too.
Should I commit the above changes? The testsuite on my system has no problems.
Dieter Kaiser
********************** Problem 231 ***************
Input:
test_bessel(bessel_i(- 2.5, - 1.5), - .8015666610717216 %i, 14)
Result:
0.234773439454848
This differed from the expected result:
true
********************** Problem 232 ***************
Input:
test_bessel(bessel_i(- 2.5, 1.5), .8015666610717216, 14)
Result:
.2347734394548481
This differed from the expected result:
true
********************** Problem 242 ***************
Input:
test_bessel(bessel_i(2.5, - 1.0), .05709890920304825 %i, 15)
Result:
.01672388330721784
This differed from the expected result:
true