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 232 should not be allowed as base ring (since it is too big). This is on sage.math btw. which is a 64-bit Linux.
Change History (2)
Resolution: |
→ wontfix
|
Status: |
new →
closed
|
Milestone: |
→ Releases 3-1-1 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/232 it works as expecteted: ....
int overflow(*), result may be wrong -2147483648
2147483648
0