simplification of atan2



On 7/21/07, Barton Willis <willisb at unk.edu> wrote:

> Regardless of your opinion about asksign in general, it seems
> wrong for a simplification function to use asksign.

Agreed.

> We could change atan2 to use atan2(x,x) = (%pi/4) * (2 * signum(x) - 1).
> This is wrong for x = 0, x = %i, ... Suggestions?

Something like
if x > 0 then %pi/4 elseif x < 0 then 5*%pi/4 else 'atan2(x, x)
could be useful here.

Robert