[GiNaC-list] conjugates of power objects

Richard B. Kreckel kreckel at ginac.de
Sun May 2 23:12:46 CEST 2010


Hi!

Alexei Sheplyakov wrote:
> I agree. Let's put it another way: unfortunately GiNaC gives no way to
> figure out if sqrt(-1) really stands for sqrt(-1 + I 0) or sqrt(-1 - I 0),
> so we don't really know the if it's +I or -I.

Focus on the imaginary part and it becomes clear that this is equivalent 
to saying "GiNaC doesn't know whether 0 corresponds to +eps or -eps for 
eps -> 0".

But the question remains: What about an unqualified 0? Or, taking the 
limit towards (-1,0) along the real axis? This question should be 
answered, too, and it is answered by a convention.

BTW: I don't think that resorting to the signed zero argument is of any 
help at all. I have always wondered how one can justify 
sqrt(-1-0*I)!=sqrt(-1+0*I) but accept -1-0*I==-1+0*I, as the standards 
demand. See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20758> for a 
discussion.

>> Opinions?
> 
> Should we stop evaluating x/x to 1, too? It gives incorrect result if x is zero.

Good point. I certainly don't argue to stop evaluating x/x -> 1. Let me 
try to justify: x/x is 1 for any complex limit path x->0. In contrast, 
conjugate(sqrt(-1+x))==sqrt(conjugate(-1+x)) only if the limit path is 
not running along the real axis. Is that convincing?

Best wishes
    -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the GiNaC-list mailing list