robert.dodier at gmail.com
Mon May 3 00:24:17 CDT 2010
On 5/2/10, Raymond Toy <toy.raymond at gmail.com> wrote:
> This seems like a bug in lsum:
> gg : x^3+t*x^2-3*x-2*t$
> Shouldn't gg be substituted? How can I do this?
Well, lsum quotes its arguments; I guess the intent is to
evaluate t only when the list values are known. Seems reasonable.
A side effect is that nothing else in the first argument gets
evaluated either. When the list values are unknown,
should lsum do something like (let (($t '$t)) (meval expr)) ??
I guess I'm against it -- clever evaluation seems to cause more
trouble than it's worth; sum being the major example.
Maybe apply(lsum, [gg*t, t, whatever]) has the effect you want.
> (The 1D display of lsum needs work too.)
I guess this is missing:
(setf (get '%lsum 'noun) '$lsum)
and for good measure we can include
(setf (get '$lsum 'verb) '%lsum)
More information about the Maxima