I always felt that asksign was one of the worst evils of Maxima. Have we
ever considered replacing it with a mechanism like piecewise() in Maple?
Apart from the fact that it'd get rid of annoying questions (often
interfering with code that is supposed to run without user intervention), it
would also allow Maxima to simplify expressions when, in the end, it turns
out that the result doesn't depend on the question after all. (For instance,
Maple simplifies piecewise(x>0,a,a) to a.)
By the way, I don't think it is silly to check the sign for atan2(x,x); if x
is positive, the result is %pi/4, but if x is negative, we're in the third
quadrant and the result is -3*%pi/4, isn't it?
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Barton Willis
Sent: Tuesday, November 18, 2008 8:30 AM
To: Raymond Toy
Cc: Maxima at math.utexas.edu; Raymond Toy
Subject: Re: [Maxima] atan2(x,x)
-----maxima-bounces at math.utexas.edu wrote: -----
>>?x?+?%i?*?y?=?sqrt(x^2?+?y^2)?*?exp(%i?*?atan2(y,x)),?so
>>?atan2(y,x)?=?-%i*log((y+%i*x)/sqrt(y^2+x^2)).?From?what
>>?I?can?tell,?Maple?and?Mathematica?are?the?same?as?Maxima:
>
>Yes,?this?makes?sense.??It's?also?the?definition?on
>functions.wolfram.com,?where?I?should?have?looked?first.
I don't know how useful it is to extend atan2 to the complex numbers.
Anyway, today I'm filled with FUD. Of course it's silly to get an
asksign for atan2(x,x), but not for atan2(sqrt(3) * x,x).
When Maxima is deep inside a computation and it asks about the sign of
<huge blob involving local variables>, it's annoying; in other cases,
the asksign is great. So I don't know what to do with atan2.
Barton
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima