besselarray bug, was: Bessel plotting problem



I don't know any bessel identity to use here.  -x is a complex number whereas +x is a real.  I got a weird result just now.

(%i1) bessel_y(1/6,-1),numer;
Maxima encountered a Lisp error:
 Error in PROGN [or a callee]: Caught fatal error [memory may be damaged]
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

(%i2) bessel_y(1/6,1),numer;
(eq 2) -0.10474436614818

(%i3) bessel_y(1/6,-1),numer;
(eq 3) -0.12905038090115*%i-0.090711281987622  

It did not work the first time but it did the second time.  

Rich



 ------------Original Message------------
From: "Robert Dodier" <robert.dodier at gmail.com>
To: "Richard Hennessy" <rvh2007 at comcast.net>
Cc: "Maxima List" <maxima at math.utexas.edu>
Date: Mon, Jun-9-2008 9:54 PM
Subject: besselarray bug, was: Bessel plotting problem

On 6/7/08, Richard Hennessy <rvh2007 at comcast.net> wrote:

> plot2d(-(%i/2+sqrt(3)/2)*%i*'(bessel_y(1/6,-x^3/3))+(bessel_j(1/6,-x^3/3))*sqrt(x),[x,.001,2],[plot_format,gnuplot]),orthopoly_returns_intervals : false;

Richard, I suspect the origin of the plot problem is this:

bessel_y(1/6,-x^3/3), x=0.001, numer;
 => BESSEL-Y: symbol $BESSELARRAY has no value

Looking at src/bessel.lisp (line 486) in the 5.15.0 source code,
it looks like $BESSELARRAY is referenced before it is assigned
anything. But only if the second argument < 0. Can you use an
identity to change the bessel_y expression to something with
second argument > 0 ??

The $BESSELARRAY stuff was cut out entirely post-5.15.0.
So maybe you could try downloading the current version from CVS:
http://maxima.cvs.sourceforge.net/maxima/maxima/src/bessel.lisp
and load that into your Maxima session & try the plot again.

HTH

Robert Dodier