Opened 13 years ago

Closed 13 years ago

#246 closed bug (fixed)

Missing check for overflow of exponents

Reported by: gorzel Owned by: somebody
Priority: major Milestone: 3-1-2 and higher
Component: dontKnow Version: 3-1-1
Keywords: Cc: hannes

Description

Although the range of the exponents of the monomials has been extendend to lager ints than 65535, there is still missing a check wether the exponent surpassed the bound.

Rmk:

> ring r=0,x,dp;
>  poly f = x300000000;
> subst(f,x,x5);
x1500000000
> subst(f,x,x15);  // Wrong
x205032704
> f^5;
x1500000000
> f^15;
x205032704     // Wrong

> // Compare
> 300000000*5;
1500000000
> 300000000*15;
// ** int overflow(*), result may be wrong
205032704

In (older) versions the coefficient of the polynomial may get corrupted as soon as an overflow of the exponent occurs.

Change History (1)

comment:1 Changed 13 years ago by hannes

Resolution: fixed
Status: newclosed

overflow check for subst.

Note: See TracTickets for help on using tickets.