Opened 8 years ago

Closed 8 years ago

#671 closed bug (fixed)

divide by zero/assertion failure in factory()

Reported by: kroeker@… Owned by: somebody
Priority: minor Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-1
Keywords: factorize failed assertion divide by zero Cc:

Description

failing example:

ring rng = (7,a,b),(x,y,z),lp;
poly p = (a^2*b^4+2*a*b^4-2*a*b^2-2*b^4-3*b^2-2)*z^6+(3*a^2*b^4+3*a^2*b^3-2*a*b^4-a*b^3+3*a*b^2+3*a*b-2*b^4+b^3-3*b^2-b-2)*z^5+(-2*a^2*b^4+a^2*b^2-2*a*b^4-3*a*b^3+3*a*b^2-a*b+a+3*b^4-2*b^3-3*b^2-3*b-3)*z^4+(-2*a^2*b^4+2*a^2*b^3+3*a^2*b^2-a^2*b-3*a*b^4-2*a*b^3-3*a*b^2-3*a*b-b^3+3)*z^3+(a^2*b^4-3*a^2*b^3-2*a^2*b^2+a^2*b-3*a^2+3*a*b^4-2*a*b^2-a*b+2*a+b^4+3*b^3-b^2-2*b-3)*z^2+(-a^2*b^4-2*a^2*b^3-a^2*b^2-a^2*b-3*a^2-a*b^4-2*a*b^3-a*b^2+2*a*b-2*b^4+3*b^3+3)*z+(-a^2*b^4+2*a^2*b^3-a^2*b-2*a^2-a*b^4+2*a*b^3+a*b^2-a*b+2*a-2*b^4-3*b^3-3*b^2-2*b-1);
def l = factorize(p);

error:

error: divide by zero
../../factory/gfops.h:187: In function `int gf_div(int, int)':
failed assertion `b != gf_q'
Singular : signal 6 (v: 4011):
current line:>>def l = factorize(p);<<

Change History (2)

comment:1 Changed 8 years ago by hannes

in LCHeuristic (facFqFactorize.cc:2712)

iter3.getItem():+(+v(1)^3+(+Z*27)*v(1)*2+(+Z^15)*v(1)+(+Z^36))*v(2)^4+
(+(+Z^6)*v(1)^2+(+Z^2)*v(1)+(+Z^35))*v(2)^3+(+(+Z^40)*v(1)^3+
(+Z^38)*v(1)^2+(+Z^6)*v(1)+(+Z^35))*v(2)^2+(+(+Z^30)*v(1)^2+(+Z^26)*v(1)+
(+Z^11))*v(2)+(+v(1)^3+(+Z^34)*v(1)^2+(+Z)*v(1)+(+Z^16))
tmp:+(+v(2)^4)*v(3)^2+(+(+Z^16)*v(2)^4+(+Z^40)*v(2)^2)*v(3)
+(+(+Z^40)*v(2)^4+(+Z^32)*v(2)^2+(+Z^40))

and after iter3.getItem() /= tmp; iter3.getItem():+0 and we get a 0/0

comment:2 Changed 8 years ago by hannes

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.