featurep(e, real)



Stavros,

> However, featurep (like sign, etc.) is a *programming tool*, not a mathematical
> function.  It is useful for dispatching on the result.  I don't think it's useful or
> helpful for it to return a conditional expression.

featurep has accreted some mathematical knowledge, because that
knowledge is useful and there's nowhere else to put it.
e.g. declare (n, integer); featurep (2*n, even); => true
In the absence of something like is (2*n in 2*Z), featurep will have to do.
Whether it was originally invented for some other purpose doesn't
matter anymore.

About undefined expressions,

> This might be OK if Maxima knew how to manipulate these things, e.g.
> undefined(1/0)-undefined(1/0) should not simplify to 0, as you say (the
> gensym solution has been discussed before, though it adds yet another
> confusing issue for the user...).

Well, I'm pretty sure that we could figure out some rules for manipulating
these expressions, if we decide we want them.

> But I also don't see what the point of this is.

That's OK. If you want 1/0 to trigger an error every time, great.
The problem with the current implementation is that there is no
other choice.

Robert