> presumably you didn't notice the different sign for the imaginary part?

Oh, no no. I did see that. Why would that be a problem?

Yes, I agree, from the name Float and DoubleFloat one might think that
these two domains are somehow related. But when you consider them as
separate domains both results are valid (within the bounds). Why would
you prefer +%i and not -%i?

Only when you consider them together, then you might get a problem.

Just let's forget about floating point numbers and consider Gaussian
integers. If you ask me for the square root of -1 and I give you -%i,
would you claim that I am wrong? Or would you just tell me: "Hey guy you
should give me two solutions and not just one."

> It's just the same issue that was present for the fractional integer 
> exponent.
> I think that this should be handled consistently so that the cut is along 
> the negative real axis,
> i.e. sqrt(-x + %i*0) -> %i*sqrt(x)

When you click on ^ at
http://fricas.github.io/api/Complex.html
then you see

^: (%, %) -> %
    x^y returns x to the power y.

and

^: (%, Fraction Integer) -> %
    x ^ y is the rational exponentiation of x by the power y.

Not very precise, I admit, but it doesn't say anything about branch
cuts. So why would you assume that your rule holds?

You can also introduce two systems of Gaussian integer. R[i] and R[j]
with i^2 = j^2 = -1 and i=-j. Of course, these rings are isomorphic.
Maybe Complex(Float) works like R[i] and Complex(DoubleFloat) like R[j].

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/3f0795b0-8e90-d027-ceb0-702d860dde69%40hemmecke.org.

Reply via email to