From: Sam Halliday <fommil@ya...>  20030710 00:05:57
Attachments:
Message as HTML

hi there, i have been on the clisp mailing list lately, as i was wanting to find a patch to clisp2.30 which fixed the floating point issues... i was pointed to CVS which has these issues fixed. now however, i am getting even stranger results from the symbolic math package maxima; with clisp2.30 (which is not reccomended, and i experience a few floating point tests fail during make check), if i type a simple differentiation like (C1) diff(sin(x),x); (D1) COS(x) the result is as expected. if however, i use build maxima with clisp CVS, i get this; (C1) diff(sin(x),x); d (D1)  (SIN(x)) dx which as you can tell is not what i wanted. i recompiled maxima to the version of clisp i have installed. since this is only apparent when i use clisp CVS and not 2.30, i am reporting this on the clisp mailing list also, as it is clearly a bug somewhere, and i am not experienced enough in either package to find what could be causing it. in the meantime, to allow me to sleep soundly at night; if anyone has a patch against clisp2.30 which fixes the floating point issues, i would be very grateful to them. i have gcc3.2.3, so clisp2.29 does not compile; also gcl has sed syntax errors in the configure script so i cant build it. i am running GNU/Linux from Scratch. cheers, Sam PS: please CC me, i am not subscribed to either list as the sourceforge servers seem to be down... (again).  The pollution's at that awkward stage. Too thick to navigate and too thin to cultivate.  Doug Sneyd 
From: Raymond Toy <toy@rt...>  20030710 13:46:19

>>>>> "Sam" == Sam Halliday <fommil@...> writes: Sam> (C1) diff(sin(x),x); Sam> (D1) COS(x) Sam> the result is as expected. if however, i use build maxima with clisp Sam> CVS, i get this; Sam> (C1) diff(sin(x),x); Sam> d Sam> (D1)  (SIN(x)) Sam> dx This is caused by a recently discovered bug. CVS CMUCL also fails in this way. Here is a potential solution. Just use the following replacement in src/commac.lisp. Ray (defun maclisptypep (x &optional type) (cond (type (lisp:let ((pred (get type 'mltypep))) (cond (pred (funcall pred x)) (t (typep x type))))) (t (typecase x (cl:cons 'list) (cl:fixnum 'fixnum) (cl:integer 'bignum) (cl:float 'flonum) (cl:number 'number) (cl:array 'array) (cl:hashtable 'hashtable) (t (typeof xtype)))))) 
From: Sam Steingold <sds@gn...>  20030710 14:56:37

> * In message <4n7k6qjxzy.fsf@...> > * On the subject of "Re: [Maxima] maxima breaks with CVS clisp" > * Sent on Thu, 10 Jul 2003 09:46:09 0400 > * Honorable Raymond Toy <toy@...> writes: > > >>>>> "Sam" == Sam Halliday <fommil@...> writes: > > > Sam> (C1) diff(sin(x),x); > Sam> (D1) COS(x) > > Sam> the result is as expected. if however, i use build maxima with clisp > Sam> CVS, i get this; > > Sam> (C1) diff(sin(x),x); > Sam> d > Sam> (D1)  (SIN(x)) > Sam> dx > > This is caused by a recently discovered bug. CVS CMUCL also fails in > this way. > > Here is a potential solution. Just use the following replacement in > src/commac.lisp. I am confused. If this is a maxima bug, why does it manifest itself on _both_ CVS CLISP and CVS CMUCL but not released versions?  Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org>; <http://www.iris.org.il>; <http://www.memri.org/>; <http://www.mideasttruth.com/>; <http://www.palestinecentral.com/links.html>; If you're passed on the right, you're in the wrong lane. 
From: Raymond Toy <toy@rt...>  20030710 16:04:27

>>>>> "Sam" == Sam Steingold <sds@...> writes: Sam> I am confused. If this is a maxima bug, why does it manifest itself on Sam> _both_ CVS CLISP and CVS CMUCL but not released versions? It is a maxima bug. It's caused by (typeof 1) not returning 'fixnum anymore. CVS CMUCL returns '(integer 1 1) and, I think, CVS Clisp returns 'bit. The original maxima code was essentially testing to see if (typep 3 (typeof 1)), which no longer works. Ray 
From: Vadim V. Zhytnikov <vvzhy@ma...>  20030712 07:42:41

Raymond Toy ?????: >>>>>>"Sam" == Sam Halliday <fommil@...> writes: > > > > Sam> (C1) diff(sin(x),x); > Sam> (D1) COS(x) > > Sam> the result is as expected. if however, i use build maxima with clisp > Sam> CVS, i get this; > > Sam> (C1) diff(sin(x),x); > Sam> d > Sam> (D1)  (SIN(x)) > Sam> dx > > This is caused by a recently discovered bug. CVS CMUCL also fails in > this way. > > Here is a potential solution. Just use the following replacement in > src/commac.lisp. > > Ray > > > > (defun maclisptypep (x &optional type) > (cond (type > (lisp:let ((pred (get type 'mltypep))) > (cond (pred > (funcall pred x)) > (t (typep x type))))) > (t > (typecase x > (cl:cons 'list) > (cl:fixnum 'fixnum) > (cl:integer 'bignum) > (cl:float 'flonum) > (cl:number 'number) > (cl:array 'array) > (cl:hashtable 'hashtable) > (t > (typeof xtype)))))) > Maxima passes all tests on CLISP CVS if I replace the last line by (typeof x)))))) Vadim  Vadim V. Zhytnikov <vvzhy@...> <vvzhy@...> 
From: Raymond Toy <toy@rt...>  20030724 18:15:45

>>>>> "Vadim" == Vadim V Zhytnikov <vvzhy@...> writes: Vadim> Maxima passes all tests on CLISP CVS Vadim> if I replace the last line by Vadim> (typeof x)))))) Oops! I'll fix this and commit it shortly. This will be the implementation for all Lisps. Ray 