Opened 9 years ago

Closed 8 years ago

#631 closed proposed feature (fixed)

detect exponent overflows for polynomial operations

Reported by: kroeker@… Owned by: somebody
Priority: minor Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-0
Keywords: overflow polynomial operations Cc:

Description

overflow hell:

 ring rng = 0,(x,y),dp;
> short = 0 ;
> 
. poly f = x^1073741823;
> subst(f,x,x^3); // ** undetected overflow **
x^3221225469*y^4294967295
> 
. f = x^2147483647;
> poly g = f*f;
> 
. g*x*x;  // ok
   ? OVERFLOW in mult(d=4294967295, d=1, max=4294967295)
   ? error occurred in or before STDIN line 12: `g*x*x;  // ok`
> 
. ideal J = g*x;
> J*x; // ** undetected overflow ** 
_[1]=y
> J*J; // ** undetected overflow ** 
_[1]=x^4294967294*y
> 
.  poly h = x^2147483647;
> 
.  h = h*x;
> ideal I = h;
> subst(I,x,x^2); // ok
// ** possible OVERFLOW in subst, max exponent is 4294967295
_[1]=1
> 
. ring G = 0,(a,b),dp;
> ideal phi = a,b;
> map m = rng,a^2,b;
> m(I); // ** undetected overflow **
_[1]=1

input:

ring rng = 0,(x,y),dp;

poly f = x^1073741823;
subst(f,x,x^3); 

f = x^2147483647;
poly g = f*f;

g*x*x;  // ok

ideal J = g*x;
J*x;
J*J;

 poly h = x^2147483647;

 h = h*x;
ideal I = h;
subst(I,x,x^2); // ok

ring G = 0,(a,b),dp;
ideal phi = a,b;
map m = rng,a^2,b;
m(I); 

Question: are other overflow issues known? May the same happen in 'factory'?

Change History (1)

comment:1 Changed 8 years ago by hannes

Resolution: fixed
Status: newclosed

partially duplicate to tr. #696, fix and test there.

Comments: factory is not involved: no degree-increasing routines of factory can be reached

Note: See TracTickets for help on using tickets.