--- Wolfgang Jenkner wrote:
> > I don't think we want to reproduce this, since it
> > is incorrect: atom(z + y + x) => false.
>
> Maxima tells you what is going on:
>
> (c4) defmatch(foo,%b%+%a%);
> %b% + %a% partitions `sum'
>
> So the sum is partitioned in a sum of atoms and a sum of whatever is
> matched by the next predicate, which happens to match anything. No
> bug here.
Gotta agree with Wolfgang on this one, after looking closer at it. I
think we have a problem here with what we expect tellsimp to do. For
examples like the above it is clearly sufficient, but there are other
cases (base 60, units) where it is insufficient or perhaps even
inappropriate. This could be a consequence of the absence of
programmer documentation - we might be trying to shoehorn tellsimp in
where some other, perhaps undocumented functionality would be more
appropriate. I think we need to focus on documenting tellsimp and
tellsimpafter, what they are supposed to do, and what they cannot do.
I have a feeling simplification is going to be a whole chapter in the
Maxima book :-/. Yuck.
If I get time I'll take another look at the base60 code, and see if I
can come up with a non-tellsimp based suggestion which isn't limited by
the constraints tellsimp imposes.
Incidently, this is a good example of why most of us always discuss any
change to any of the core src files on the list first - a change at
that level needs concensus before it goes into CVS. Usually it works
like:
proposal (sometimes w/ code) -> discussion -> iteration -> discussion
-> iteration -> concensus -> wait for Jim to give the nod.
This is fairly informal at this point but seems to work rather well.
This is why I haven't commited the post_eval_functions patches, for
exmaple - we seem to have iterated to desired functionality, but it
needs final approval. Share packages and docs don't need to be as
strict, but changing core functionality should (IMHO anyway) always go
through this cycle.
CY
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com