Further Improvements of bessel_j



Dieter Kaiser wrote:
> I implemented the constants INFINITY, MINF and INF because it seems to me
> natural to you use the known constants for the special cases.
> 
> For bessel_y I get the following values with the changed code:
> 
> bessel_y(0,0.0)    --> minf
> bessel_y(2,0.0)    --> infinity
> bessel_y(1+%i,0.0) --> infinity
> 
> Limit gives the same values:
> 
> limit(bessel_y(0,x),x,0)    --> minf
> limit(bessel_y(2,x),x,0)    --> infinity
> limit(bessel_y(1+%i,x),x,0) --> infinity
> 
> For the special case of a purely imaginary order the function is not defined for
> arg = 0.0. So I implemented a domain-error. 
> 
> Bessel_y(%i,0.0) --> domain-error
> 
> (I have not found a documentation for other constants which I could use. Now I
> have seen that we have '$UND und '$IND.) 
> 
> The other Bessel functions are implemented in a similar manner. So I don't know
> the problems which could arise in Maxima if we implement these constants as
> return-values.

I've applied your changes.  Should be available in CVS shortly.


> 
> The function cot is interesting. I get
> 
> cot(0)              --> domain-error
> limit(cot(x),x,0)   --> und
> 
> cot(%pi),numer      --> -8.165 e+15 (should be a domain-error too)
> limit(cot(x),x,%pi) --> und

For cot(%pi),numer, I think the code checks for the numer flag first, 
which causes %pi to be converted to a number.  And the code that checks 
for domain-error probably doesn't check for periodicities, because 
that's pretty hard, probably because 3.14159... as a float isn't the 
same as %pi.

Ray