Update of /cvsroot/maxima/maxima/src
In directory sc8prcvs1.sourceforge.net:/tmp/cvsserv19597/src
Modified Files:
hyp.lisp
Log Message:
o bestrig when the arg is negative had an extra (1)^((a1)/2) term,
so multiply by (1)^((a1)/2) to get rid of it. Not sure this is
the best solution.
o hgfred([v+1/2],[2*v+1],foo) was totally wrong v is half of an odd
integer because besredtrig returned spurious sqrt(%i) terms. For
now, let's not try to handle this case in bestrig. The general
result is right, and a call to expand (with besselexpand:true) will
get the desired results.
Index: hyp.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima/src/hyp.lisp,v
retrieving revision 1.11
retrieving revision 1.12
diff u d r1.11 r1.12
 hyp.lisp 26 Nov 2004 15:54:23 0000 1.11
+++ hyp.lisp 29 Nov 2004 18:20:22 0000 1.12
@@ 348,9 +348,14 @@
(prog (n res)
;; gamma(a)*x^((1a)/2)
(setq res (mul (gm a) (power x (div (sub 1 a) 2))))
+ #+(or)
(cond ((and (maximaintegerp (add a a))
(numberp (setq n (sub a (inv 2))))
(lessp n $bestriglim))
+ ;; This is totally broken. It's got an extra (1)^foo
+ ;; factor, so let's not use it at all for now. Use the
+ ;; general forms below and let expand get the right
+ ;; answer.
(return (mul res
(meval (besredtrig ( n 1)
(mul 2
@@ 360,7 +365,11 @@
(inv
2)))))))))
(cond ((equal (checksigntm x) '$negative)
+ ;; Not sure this is right, but the call to bes has an
+ ;; extra factor (1)^((a1)/2), so we cancel that out by
+ ;; multiplying by (1)^((a1)/2).
(return (mul res
+ (power 1 (div (sub a 1) 2))
(bes (sub a 1) (setq x (mul 1 x)) 'j)))))
(return (mul res (bes (sub a 1) x 'i)))))
