Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Maxima-commits] CVS: maxima/src bessel.lisp,1.83,1.84

 [Maxima-commits] CVS: maxima/src bessel.lisp,1.83,1.84 From: Dieter Kaiser - 2009-12-27 18:57:00 Update of /cvsroot/maxima/maxima/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32456/src Modified Files: bessel.lisp Log Message: Correcting the factor for the expansion of bessel_k: It is sqrt(%pi/2)/sqrt(x) and not sqrt(%pi/2/x). Updating the comment about the expansion of bessel_k. Related bug report: Bug ID: 2921946 - Expansion of bessel_k(1/2,x) with radexpand:false No problems with the testsuite. Index: bessel.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/bessel.lisp,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- bessel.lisp 19 Dec 2009 15:36:28 -0000 1.83 +++ bessel.lisp 27 Dec 2009 18:56:48 -0000 1.84 @@ -1325,14 +1325,13 @@ ;; sqrt(%pi/2/z)*K[n+1/2](z) = (%pi/2/z)*exp(-z)*sum (n+1/2,k)/(2*z)^k ;; ;; or -;; n -;; K[n+1/2](z) = sqrt(%pi/(2*z)) sum (n+1/2,k)/(2*z)^k -;; k=0 +;; n +;; K[n+1/2](z) = sqrt(%pi/2)/sqrt(z)*exp(-z) sum (n+1/2,k)/(2*z)^k +;; k=0 ;; ;; where (A&S 10.1.9) ;; ;; (n+1/2,k) = (n+k)!/k!/(n-k)! -;; (defun k-fun (n z) (declare (type unsigned-byte n)) @@ -1349,7 +1348,8 @@ (defun bessel-k-half-order (order arg) (let ((order (truncate (abs order)))) - (mul (mul (power (div '\$%pi (mul 2 arg)) '((rat simp) 1 2)) + (mul (mul (power (div '\$%pi 2) '((rat simp) 1 2)) + (power arg '((rat simp) -1 2)) (power '\$%e (neg arg))) (k-fun (abs order) arg))))