On 3/24/07, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 3/24/07, Barton Willis <willisb at unk.edu> wrote:
> > The function charfun (defined in nummod) makes a call to $ev:...
> A better solution is to rework the evaluation of Boolean
> expressions so that Maxima doesn't barf on stuff like
> (- 1 < x and x < 1).
Agreed.
> Maybe we can get Stavros and Richard to permit partially-evaluated
> Boolean expressions, even though (it appears) they are dead-set
> against partially-evaluated conditional expressions.
I have *always* been for simplifying conditionals and booleans,
including things like (x>1 and x<3), and in fact my response to Barton
(which must have "crossed yours in the mail") says
> ...Maxima's handling of comparisons and boolean operations
> was poor. Fortunately, Robert's boolsimp fixes a lot of that...
> A redesigned and rewritten charfun... should take full advantage
> of boolsimp.
The one place I *do* object to the "partially evaluated" approach is
in programming constructs like if/then/else. I also agree that we
need a simplifying conditional expression, just that it should be
distinct from if/then/else, which has too much baggage as an
imperative programming construct. (We also have to solve the "if x#0
then 1/x" problem, but that's another matter.)
As for charfun(a,b,c), I agree with Robert that it is redundant, though handy.
> > A smarter charfun would know that charfun(x>0,x<0) = 0...
> The place to put that would be in the evaluation of Boolean expressions.
No!! That has nothing to do with evaluation and everything to do with
simplification!!!
-s