Processing math: 100%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Note that the mapping is just taking the binary digits of the integer and using them as coefficients w.r.t. the basis 1,x,x2,

You can use the built-in integer_representation() method, or do the job manually:

sage: a = F.fetch_int(3)
sage: a.integer_representation()
3
sage: ZZ(list(vector(a)), base=2)
3