The intent of
(setq l ($expand l))
(cons l l))
is to properly return (cons 0 0) or (cons 0.0 0.0), or ... Since 0 * 0.0 --> 0,
(setq l (mul 0 l))
(cons l l)
doesn't work. Or we could say uncle and return (cons 0 0)--that would be non-terrible.
--Barton
________________________________
On Wed, Jul 18, 2012 at 9:17 AM, Barton Willis <willisb at unk.edu<mailto:willisb at unk.edu>> wrote:
This was my commit--I purloined the catch stuff from csign (defined in compar.lisp). I believe I tested the patch with CCL & SBCL.
As I recall after I committed this patch, Robert made a related change. True? What was it?
It turns out that with cmucl, with that bit of code, $sign returns $zero. But expand on the expression doesn't produce 0, but rectform does. A quick test with ccl shows that, at least for the one test I tried, $sign doesn't return 0, so the other branches are done.
Do you have a suggestion on what the code should do? Since $sign says $zero, should we just give on expand and just return (cons 0 0)?
Ray