Thank you for you answer Robert

Just the alternative to fetch_int I needed.
The problem was that if you try to use fetch_int on a field of larger
size than GF(5^5) e.g. GF(3^42), then SAGE will switch to PARI finite
field objects and then the fetch_int will not work. But you small
alternative sum do.

Thanks!

/David

On Oct 23, 4:54 pm, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> On Oct 23, 2008, at 4:51 AM, David Møller Hansen wrote:
>
>
>
> > Is there a function for FiniteField_ext_pari objects that in the same
> > way as "fetch_int" for the FiniteField_givaro objects can give me the
> > field element representation of an integer?
>
> I'm not seeing which fetch_int you're referring to for  
> FiniteField_givaro objects, but you can do the same with
>
> sage: K.<a> = GF(5^5)
> sage: K.fetch_int(159)
> a^3 + a^2 + a + 4
> sage: sum([a^k*c for k, c in enumerate(159.digits(K.characteristic()))])
> a^3 + a^2 + a + 4
>
> - Robert
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to