simplify



On Sep 12, 2009, at 2:38 PM, Barton Willis wrote:

>
> The call to meval is almost always a mistake. In hec3, I think you  
> want
> something like
> (take '($trigsimp) x) instead of  (meval `(($trigsimp) ,x))); example:
>
>   (%i3) (a : b, b : c, c : d)$
>
> OK:
>
>   (%i4) ?hec2(a);
>   (%o4) b
>
> Not OK:
>
>   (%i5) ?hec3(a);
>   (%o5) c
>
> Also, consider changing funcall  --> mfuncall (maybe not all of  
> them). That
> way, a user could write a cost function
> in Maxima. Sorry for the three back to back postings---for now,  
> this is all
> that I can think of.
>
> Barton

Seems to me I'm seriously under-experienced for writing 'simplify' :)

Thanks for fixes.

User specified cost function is a nice generalization, but in reality  
a Maxima function will probably be too slow (just my guess) - still  
there's no need not to support it.

I've attached the 'fixed' simplify.lisp.

$cost is now $leaf_count.

I have a problem with
(defun hec3 (x)
   (take '($trigsimp) x))

(%i55) (a:b, b:c, c:d)$
(%i56) ?hec3(a);
(%o56) trigsimp(b)

It doesn't evaluate it?

Regards,
Ziga

-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplify.lisp
Type: application/octet-stream
Size: 2304 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20090912/e90b5846/attachment.obj