Unsimplified expression 0^a causes problems



Sorry, but I had to revert in part revision 1.97 of simp.lisp. The
implementation of an unsimplified 0^a expression does not work with the
routine timesin. We get a Lisp error when doing something like 2*0^a.

Therefore, I have reverted this back to the result ZERO, when the sign
of realpart(a) is not known. This is the old behavior. Nevertheless,
special simplifications are still present.

By the way, it might be of interest how I detected this error. 

I try to develop a tool to generate automatically valid Maxima
expressions, which have a known value. This is an example of a valid
expression, which has the value 3. You get the value, when you insert
the number one for the symbol $x1

  ((MPLUS) ((MQUOTIENT) $X1 $X1) ((MPLUS) $X1 $X1))

Maxima simplifies this to

  ((MPLUS SIMP) 1 ((MTIMES SIMP) 2 $X1))

This expression again has the value 3, when we insert the number one for
$x1. We have a valid simplification.

This way the expression 

 ((MPLUS) ((MEXPT) $X0 $X1) ((MEXPT) $X0 $X1)))

was generated which causes a Lisp error, when inserting the number zero
for the symbol $x0.

The point is that the tool generates automatically expressions which
seems to be simple and obviously to be correct. Surprisingly, I have
found immediately a bug this way.

Dieter Kaiser