Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exponent overflow in PolynomialRing(): need a work around

PolynomialRing() gives an OverflowError for exponents larger than 32768. For example

sage: R = GF(2**28, 'a')
sage: a = R.gen() 
sage: x = PolynomialRing(R, 'x', 4).gens() 
sage: f = x[0]**32768 
sage: f = x[0]**32769 
...
OverflowError: Exponent overflow (32769).

I need to make a function containing x[0]**(2**28 - 2). How can I get Sage to do that?

click to hide/show revision 2
added my Sage version.

Exponent overflow in PolynomialRing(): need a work around

PolynomialRing() gives an OverflowError for exponents larger than 32768. For example

sage: R = GF(2**28, 'a')
sage: a = R.gen() 
sage: x = PolynomialRing(R, 'x', 4).gens() 
sage: f = x[0]**32768 
sage: f = x[0]**32769 
...
OverflowError: Exponent overflow (32769).

I need to make a function containing x[0]**(2**28 - 2). How can I get Sage to do that?

I am using Sage Version 5.3, Release Date: 2012-09-08.