Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why are you messing with _cache? It seems the following just works:

sage: k.<a>=GF(2^113)
sage: z=a^113+a^9+1
sage: z.integer_representation()
556
sage: k.fetch_int(556)
a^9 + a^5 + a^3 + a^2
sage: k.fetch_int(556) == z
True