[GiNaC-list] conjugates of power objects
alexei.sheplyakov at gmail.com
Fri Apr 30 23:43:02 CEST 2010
On Fri, Apr 30, 2010 at 09:06:03AM +0200, Richard B. Kreckel wrote:
> Trying to argue that sqrt(-1) is ill-defined is going to rise an
> eyebrow or two, I guess. ;-)
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.
Does this explanation make any sense?
> Alas, I think that automatic evaluation of conjugation is too
> aggressive in GiNaC. It just keeps giving incorrect results on
> branch cuts. Here are some examples, using ginsh:
> > conjugate(sqrt(x));
> > conjugate(sqrt(x))-sqrt(conjugate(x));
> > conjugate(sqrt(-1))-sqrt(conjugate(-1));
> > conjugate(log(x));
> > conjugate(log(x))-log(conjugate(x));
> > conjugate(log(-1))-log(conjugate(-1));
> I suggest to disable automatic evaluateion of conjugation where
> these kinds of problems can appear.
Should we stop evaluating x/x to 1, too? It gives incorrect result if x is zero.
More information about the GiNaC-list