imagpart of bessel_i



On Oct. 25, 2011, I wrote:
--------------------------
>nint.mac is now using the new bessel.lisp.
>
>Until the rounding error problem of bessel_i is fixed, we can use
>a workaround suggested by you (Dieter Kaiser), namely to use
>a float number instead of an integer for the order of the bessel
>function.
------------------------------
Example of the use of a float order bessel function
 (a temporary stratagem) implimented now
in nint, in which nint automatically
bypasses integrate and sends
integrand to quadpack because the integrand
 both involves special functions and the range
is greater than maxrange (due to a present float bug
in hypergeometric), and the option strong_osc
forces the exclusive use of quad_qag (to save time):

Since the integrand is automatically separated into
real and imaginary parts for use of quadpack
routines, we have two parts:

(%i8) nint(bessel_i(1.0,%i*x),x,1,10^4,strong_osc);
" this will take a while "

" this will take a while "

(%o8) 0.77229384691138*%i

(%i9) time(%);
(%o9) [60.97]

(%i10) gargL;
(%o10) [[[qag,'realpart(bessel_i(1.0,%i*x)),x,1,10000,3,epsrel = 1.0E-8,
          limit = 700],
         [qag,'imagpart(bessel_i(1.0,%i*x)),x,1,10000,3,epsrel = 1.0E-8,
          limit = 700]]]

(%i11) goutL;
(%o11) [[[qag,2.0359456460377781E-16,6.1158684097826728E-15,43369,1],
         [qag,0.77229384691138,1.1418381427522419E-12,31713,0]]]

The error return from the realpart effort is ignored because
fchop(2.0359456460377781E-16)  -->  0.0 and this doesn't 
contribute to the answer anyway.

Ted Woollett