Wrong simplification of log(1/z)



The following line in simpln in the file simp.lisp together with the routine
simpln1 causes the simplification of log(1/z):

	((and $logexpand (mexptp y)) (simpln1 y))

(defun simpln1 (w)
  (simplifya (list '(mtimes) (caddr w)
		   (simplifya (list '(%log) (cadr w)) t)) t))

This code therefore allways simplifies when logexpand is not false like:

log(z^a)= a*log(z)

So we have a Log function with no check of the parameters. This might be correct
for a wide range of parameters including z,a real and positive. For a complete
symbolically support of the Log function the most general correct answer could
be:

(1) a*log(z)+2*%i*%pi*((%pi-imagpart(a*log(z)))/(2*%pi))

This simplifies for a real parameter a and a*arg(z) in (-%pi,*pi] to

(2) a*log(z)

I had only a short look at the code of plog. This code does the mathematic
better, but try to ask things that are useless. As I reported we get wrong
results because we can't give correct answers to wrong questions.

Dieter Kaiser