Stavros Macrakis writes:
> On Sat, 15 Jan 2005 11:47:51 +0100, Daniel van Leeuwen
> wrote:
>> (C1) limit(atan(x)/(1/exp(1)-exp(-(1+x)^2)),x,inf,plus);
>> %E %I LOG(- 1)
>> (D1) --------------
>> 2
> It is unambiguously a bug. The returned value is equivalent to
> -%e*%pi/2, which is the wrong sign.
If `log' were always meant to be the principal branch the `lognegint'
switch would be quite useless (instead of being merely kludgey).
Nothing prevents us from taking log(-1)=-%pi*%i here, which gives the
correct result.
Of course, Maxima is not being nice here, and the ambiguous result
might be due to a wrong turn somewhere, but I am inclined to think
that we can't tell from just looking at the result.
It is also true that such ambiguities tend to play havoc with more
complex (bad pun intended) calculations.
Wolfgang