Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#138 closed bug (wontfix)

Int overflow in integer mod ring

Reported by: Martin Albrecht Owned by: hannes
Priority: major Milestone: 3-1-1
Component: singular-kernel Version: 3-1-0
Keywords: Cc:

Description

> 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)

comment:1 Changed 11 years ago by hannes

  • Resolution set to wontfix
  • Status changed from new to closed

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:
....

2*(230); this is of type int

int overflow(*), result may be wrong
-2147483648

2*number(230); this is of type number

2147483648

_*2; also number

0

comment:2 Changed 11 years ago by seelisch

  • Milestone set to Releases 3-1-1 and higher
Note: See TracTickets for help on using tickets.