On 19 April 2014 08:40, Irene <[email protected]> wrote: > Hi! > I have the following: > p=3700001 > Fp2=GF(p^2, 'b') > > and I want to compute the cubic root of 344694*b + 1653339. > How can I do it? Because when I write (344694*b + 1653339)^(1/3) it gives me > as result 1, and the same for every element that I consider in Fp2, or for > every exponent 1/n.
Here is one way: sage: p=3700001 sage: Fp2.<b>=GF(p^2) sage: a = 344694*b + 1653339 Now either sage: x = polygen(Fp2) sage: (x^3-a).roots(multiplicities=False) [401927*b + 661235, 259308*b + 3298074, 3038766*b + 3440693] or just sage: a.nth_root(3) 259308*b + 3298074 sage: a.nth_root(3,all=True) [259308*b + 3298074, 3038766*b + 3440693, 401927*b + 661235] Since the field contains the 3rd roots of unity there are three cube roots (if any). I don't exactly know what the ^(1/3) promises, since Sage calls pari and I have not looked up the pari documentation. Since your output was 1 it looks suspiciously as if the 1/3 was rounded before exponentiation. And since 1 is certainly not one of the cube roots of a, I think you have found a bug! John > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
