realpart(sqrt(a)) => cos(atan2(...))*...



>>>>> "Stavros" == Stavros Macrakis <macrakis at alum.mit.edu> writes:

    Stavros> Currently,

    Stavros> ? ? ? ?realpart(sqrt(a)) =>
    Stavros> ? ? ? ? ? ?cos(atan2(0,a)/2)*sqrt(abs(a))

    Stavros> This is of course correct, but not very useful.

    Stavros> For one thing, it gives an error for a=0.

But limit(cos(atan2(0,a)/2)*sqrt(abs(a)),a,0) -> 0.

    Stavros> For another, it doesn't simplify to sqrt(-a) with
    Stavros> assume(a<=0). (Though it does simplify to sqrt(a) for

Why should it simplify to sqrt(-a)?  Shouldn't the realpart simplify
to 0 in that case?

Ray