Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hcrvax.UUCP Path: utzoo!hcrvax!petera From: petera@hcrvax.UUCP (Smith) Newsgroups: net.lang,net.lang.lisp Subject: Re: Re: Re: Using LISP for scientific programming? (gasp!) Message-ID: <2034@hcrvax.UUCP> Date: Wed, 23-Oct-85 18:18:38 EDT Article-I.D.: hcrvax.2034 Posted: Wed Oct 23 18:18:38 1985 Date-Received: Thu, 24-Oct-85 04:51:49 EDT References: <1057@sdcsvax.UUCP> <1418@umcp-cs.UUCP> Distribution: net Organization: Human Computing Resources, Toronto Lines: 34 > You should be aware that the SYMBOLICS 3600 fits 32bit floats directly in > the pointer field of objects, so for single precision there is no > garbage. Such a capability does seem to be essential for fast numerical > analysis in lisp. I don't understand? Using the car or cdr field of a CONS cell as a floating point number does not stop you from getting garbage because you still cannot operate on that location. If you do you will change it's value everwhere that it is referenced (LISP avoids copying lists if possible) You can use a specific in-place function to do the operation but you must know what you are doing. ie: (eq 4 (+ 2 2)) is nil because they are not the same floatnum atom. If it is nil then we have created garbage by introducing a new value for (+ 2 2). If we use the standard (setq) function such as: (setq 'n (+ n 1)) then we have created a new value for 'n and the old one is still hanging around. This is regardless of how we store the pointer/float as a union somewhere. As far as I know the only way to avoid a construct like this causing garbage is to actually alter the floatnum cell that is bound to 'n at that moment in the alist. Since this 'n is going to also be referenced by all other copies of the partially evaluated lambda expression we will incorrectly alter many other function's intermediate value of 'n. It's like changing the actual value of paramater when we were only passed it's value. Anyway the point I wanted to make was that using a pure LISP or something like it you have to watch what you are doing to avoid massive garbage build up. Peter Ashwood-Smith Human Computing Resources, Toronto, Ontario.