Int overflow in integer mod ring
> ring r = (integer,2,32),(x,y,z),dp;
// ** You are using coefficients rings which are not fields.
// ** Please note that only limited functionality is available
// ** for these coefficients.
// **
// ** The following commands are meant to work:
// **  basic polynomial arithmetic
// **  std
// **  reduce
// ** redefining r **
> 2*(2*x^30);
4x30
> 2*(2*x)^30;
2147483648x30
> 2*(2^30);
// ** int overflow(*), result may be wrong
2147483648
So it seems 2^{32} should not be allowed as base ring (since it is too big). This is on sage.math btw. which is a 64bit Linux.
Change History (2)
Resolution: 
→ wontfix

Status: 
new →
closed

Milestone: 
→ Releases 311 and higher

Has nothing to do with the ring: this is an overflow for the type int. For number (which depends on the ring and is here Z/2^{32 it works as expecteted: .... }
int overflow(*), result may be wrong 2147483648
2147483648
0