## maxima-commits

 [Maxima-commits] Maxima, A Computer Algebra System branch master updated. 5.28.0-10-g162447b From: Raymond Toy - 2012-08-19 17:26:44 ```This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima, A Computer Algebra System". The branch, master has been updated via 162447bf687de79b4d4389848103298d5d81d981 (commit) from 84efbcca80ef64d288d1dd0c2fe5ce62bfb98a12 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 162447bf687de79b4d4389848103298d5d81d981 Author: Raymond Toy Date: Sun Aug 19 10:26:31 2012 -0700 A fix for bug 3559064: elliptic_f(2,1) is wrong. src/ellipt.lisp: o Signal an error if abs(phi) >= %pi/2. tests/rtest16.mac: o Add test. diff --git a/src/ellipt.lisp b/src/ellipt.lisp index 7bd05d1..b085f4c 100644 --- a/src/ellipt.lisp +++ b/src/ellipt.lisp @@ -1543,10 +1543,15 @@ first kind: ;; A&S 17.4.19 phi) ((onep1 m) - ;; A&S 17.4.21. Let's pick the log tan form. - `((%log) ((%tan) - ((mplus) ((mtimes) \$%pi ((rat) 1 4)) - ((mtimes) ((rat) 1 2) ,phi))))) + ;; A&S 17.4.21. Let's pick the log tan form. But only use + ;; it if abs(phi) < %pi/2. + (cond ((eq '\$neg (csign (sub (\$abs phi) (div '\$%pi 2)))) + `((%log) ((%tan) + ((mplus) ((mtimes) \$%pi ((rat) 1 4)) + ((mtimes) ((rat) 1 2) ,phi))))) + (t + (merror (intl:gettext "elliptic_f(~:M, ~:M) is undefined.") + phi m)))) ((alike1 phi '((mtimes) ((rat) 1 2) \$%pi)) ;; Complete elliptic integral `((%elliptic_kc) ,m)) diff --git a/tests/rtest16.mac b/tests/rtest16.mac index 5d7d041..e2272e2 100644 --- a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ -2323,3 +2323,9 @@ bessel_i(0,z); */ realpart(log(-1b0)); 0; + +/* + * Bug 3559064: elliptic_f(2,1) is wrong. + */ +errcatch(elliptic_f(2,1)); +[]; ----------------------------------------------------------------------- Summary of changes: src/ellipt.lisp | 13 +++++++++---- tests/rtest16.mac | 6 ++++++ 2 files changed, 15 insertions(+), 4 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System ```