What is the error with my thinking?
Sometimes imagpart(log(-%i))
is negative:
(%i1641) imagpart(log(-%i));
%pi
(%o1641) - ---
2
But this shows the imaginary part of log ranging from 0 to 2*pi:
wxplot2d(imagpart(log(-1/exp(%i*2*%pi*x))), [x, -1, +1]);
image here. Are the results of Maxima's log() predictable without studying the source code, and if so, how?
Edited to document additional bizarre Maxima behavior. Compare the ranges between these two:
wxplot2d(imagpart(log(+exp(%i*2*%pi*x))), [x, -1, +1]);
wxplot2d(imagpart(log(-exp(%i*2*%pi*x))), [x, -1, +1]);
What's the secret to predicting Maxima's results?
Edited to add: Despite the extensive replies about log being "multivalued", the same behavior is exhibited plog, proving log's "multivalued" nature to be irrelevant.