On Tuesday 27 August 2024 at 05:42:55 UTC-7 vdelecroix wrote:

This is indeed annoying. For further input, notice that python gives 
the complex principal root rather than the real root 

>>> (-1.) ** 0.33 
(0.5090414157503712+0.8607420270039436j)

 
I'm not sure that's a completely fair comparison. Here you're really 
looking at raising a float to a float power, whereas in the the question 
was about raising a (negative real) algebraic number to a fractional power 
with odd denominator.

However, the fact that Qbar( (AA(-1))^(1/3)) != (Qbar( (AA(-1)))^(1/3) is 
problematic, I think. Add to that that currently even

RR(AA(-1)^(1/3)) != (RR(AA(-1))^(1/3)

(which is undoubtedly a corollary of the design decision in python) and I 
think there's a good reason to change. It's just hard to find analogous 
situations in python/sage where another branch choice is made.

There's a question of parent, though:
RR(3)^(1/3).parent() != RR(-3)!(1/3).parent(), so on real fields, raising 
to a power is treated differently between positive and negative bases. It 
would stand to reason that we do keep doing that on real algebraics.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/8ef5c846-38ef-48cc-a069-0029df7cb74dn%40googlegroups.com.

Reply via email to