atan2(x,x)



Viktor T. Toth wrote:
> 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?
>   
Probably every variation you have thought of has been considered, and 
some of them programmed.
Robert Dodier, in particular, has been advocating for "fixing" this 
recently. But attempts to do this
in Macsyma date back at least 30 years.
> 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.)
>   


It would also mean than a program might generate exponentially many 
sub-expressions (e.g. in the case
there are n asksigns, figure there will be 3^n pieces.

With a much more robust "assume" facility this might be cut down.  The 
generalization of maxima that
would be required to handle this would be substantial.

e.g.  instead of simplifying x/x  to 1,   we might need   "if x=0 then 
undefined else 1"  or
"1 unless x=0"   or something else.

There are some idea that are used in Mathematica's Reduce command, and 
some kinds of representations
were coded in the TILU database of integration formulas.  But the major 
difficulty is, I think, if you get an answer
(and you can assume the answer will be, too often, very very ugly), what 
can you do with it?