From: Raymond Toy <rtoy@us...>  20120330 06:16:24

This is an automated email from the git hooks/postreceive 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 fda1a1d8547b01fbcdfb4e82468844cf2e90830d (commit) via bf1512bf255acbb205a7c508a614633a16cb6f3b (commit) via 06cacda4815b61cf91414c175a30cb15eb948071 (commit) via afaf6a4174af06594e22d56dec16978afc1a8b3d (commit) from f69ec272d1593a0cad1894b1ac0da8ea0e1f0dce (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 fda1a1d8547b01fbcdfb4e82468844cf2e90830d Merge: bf1512b f69ec27 Author: Raymond Toy <toy.raymond@...> Date: Thu Mar 29 23:16:08 2012 0700 Merge branch 'master' of ssh://maxima.git.sourceforge.net/gitroot/maxima/maxima commit bf1512bf255acbb205a7c508a614633a16cb6f3b Author: Raymond Toy <toy.raymond@...> Date: Thu Mar 29 23:13:17 2012 0700 Add entries for CCL and ECL which have been working with maxima quite well for some time now. diff git a/README.lisps b/README.lisps index c87b6d2..7d76543 100644  a/README.lisps +++ b/README.lisps @@ 103,8 +103,24 @@ There are SBCL implementations only for Unixlike systems (not MS Windows).  Allegro Common Lisp and OpenMCL: +Allegro Common Lisp:  Maxima should work with Allegro Common Lisp and OpenMCL, but + Maxima should work with Allegro Common Lisp, but only limited testing has been done with these Lisp implementations. User feedback would be welcome. + + +CCL <http://clozure.com>; + + CCL, formerly known as OpenMCL, is known to work with maxima on +all platforms where ccl runs including Linux, Mac OSX, and Windows. +There are appear to be some bugs in the 32bit version of ccl, but +the 64bit version passes all tests. + + +ECL <http://ecls.sourceforge.net>; + + ECL is known to work with maxima and passes the testsuite. ECL +runs on many platforms and OSes. + + commit 06cacda4815b61cf91414c175a30cb15eb948071 Author: Raymond Toy <toy.raymond@...> Date: Thu Mar 29 23:05:05 2012 0700 Add ccl, cmucl, and ecl to the list of Unicodeaware Lisp implementations. diff git a/README.i18n b/README.i18n index a9ba8e1..cfe6404 100644  a/README.i18n +++ b/README.i18n @@ 31,6 +31,6 @@ Second pair of options build language pack for Unicode locales (es_XX.UTF8, pt_XX.UTF8). They are compatible only with Unicodeaware Lisp implementations such as clisp +Lisp implementations such as ccl, clisp, cmucl, ecl, and sbcl. commit afaf6a4174af06594e22d56dec16978afc1a8b3d Author: Raymond Toy <toy.raymond@...> Date: Thu Mar 29 23:02:02 2012 0700 Add TRYFLOATCOMPUTATION to try a computation and return NIL if an error occurred or if the result is infinity or NaN. Otherwise return the value. Use it in $FLOAT when computing the log of a large rational that won't fit in a doublefloat number. diff git a/src/comm.lisp b/src/comm.lisp index 94c3823..b9dddff 100644  a/src/comm.lisp +++ b/src/comm.lisp @@ 1164,6 +1164,24 @@ (defmfun $fix (e) (take '($floor) e)) +;; Evaluate THUNK ignoring any error that might occur. If the THUNK +;; returns a good number (not infinity or NaN), then return the +;; number. Otherwise, return NIL to indicate that we the computation +;; failed. This is a pretty bruteforce approach. +(defun tryfloatcomputation (thunk) + (let ((errcatch t) + (*mdebug* nil)) + (let ((result (ignoreerrors (funcall thunk)))) + (labels ((badnumberp (num) + (if (complexp num) + (or (badnumberp (realpart num)) + (badnumberp (imagpart num))) + (or (floatinfp num) + (floatnanp num))))) + (if (and result (badnumberp result)) + nil + result))))) + (defmfun $float (e) (cond ((numberp e) (float e)) ((and (symbolp e) (mget e '$numer))) @@ 1188,7 +1206,8 @@ ;; float(log(int)). First try to compute (log ;; (float n)). If that works, we're done. ;; Otherwise we need to do more.  (to (or #(or gcl ecl) (ignoreerrors (log (float n))) + (to (or (tryfloatcomputation #'(lambda () + (log (float n)))) (let ((m (integerlength n))) ;; Write n as (n/2^m)*2^m where m is the number of ;; bits in n. Then log(n) = log(2^m) + log(n/2^m). @@ 1199,8 +1218,8 @@ (($ratnump n) ;; float(log(n/m)) where n and m are integers. Try computing ;; it first. If it fails, compute as log(n)  log(m).  (let ((try #(or gcl ecl)  (ignoreerrors (log (fpcofrat n))))) + (let ((try (tryfloatcomputation #'(lambda() + (log (fpcofrat n)))))) (if try (to try) (sub ($float `((%log) ,(second n))) @@ 1209,9 +1228,9 @@ ;; float(log(n+m*%i)). (let ((re ($realpart n)) (im ($imagpart n)))  (to (or #(or gcl ecl)  (ignoreerrors (log (complex (float re)  (float im)))) + (to (or (tryfloatcomputation #'(lambda () + (log (complex (float re) + (float im))))) (let* ((size (max (integerlength re) (integerlength im))) (scale (ash 1 size)))  Summary of changes: README.i18n  2 + README.lisps  20 ++++++++++++++++++ src/comm.lisp  31 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 9 deletions() hooks/postreceive  Maxima, A Computer Algebra System 