Subject: bessel.lisp error codes and noisy quad_qagi
From: Edwin Woollett
Date: Fri, 11 Nov 2011 14:00:58 -0800
Raymond Toy reported that ierr = 2 indicated
overflow in bessel.lisp.
What do the rest of the ierr values returned
in bessel.lisp indicate?
In particular, I am interested in 3 and 4.
Are these error codes common to other
parts of Maxima lisp code?
I am getting many pages of
the message:
zbesk ierr = 3
when calling quad_qagi with the real part
of bessel_k(2,%i*x):
--------------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
2011-11-11
(%i1) display2d:false$
(%i2) quad_qagi(bessel_k(2,%i*x),x,1,inf);
(%o2) quad_qagi(bessel_k(2,%i*x),x,1,inf,epsrel = 1.0E-8,epsabs = 0.0,
limit = 200)
(%i3) assume(x>0)$
(%i4) realpart(bessel_k(2,%i*x));
(%o4) 'realpart(bessel_k(2,%i*x))
(%i5) quad_qagi(realpart(bessel_k(2,%i*x)),x,1,inf);
zbesk ierr = 3
zbesk ierr = 3
zbesk ierr = 3
zbesk ierr = 3
zbesk ierr = 3
...continues for about 20 pages of output
... finally:
***MESSAGE FROM ROUTINE DQAGI IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 5
*
***END OF MESSAGE
(%o5) [-311.0051190974822,70.21683385597015,5985,5]
Is there a *quieter way* I can use quad_qagi for this
calculation?
The asserted Mathematica answer to this numerical integral
is -1.45355 + 1.50855*%i
Ted Woollett