X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffactor.cpp;h=9b06e6e1ce99f08649dbaf612b35a3bd000557fe;hp=5489b4ceb79eb87a99ba36ef9e17e5dac96b3005;hb=321d5c941f81b1d0b86de91f3f17c5af5b6e4642;hpb=37c418c602485be9b023378a1b60ebdb4a592f2a diff --git a/ginac/factor.cpp b/ginac/factor.cpp index 5489b4ce..9b06e6e1 100644 --- a/ginac/factor.cpp +++ b/ginac/factor.cpp @@ -888,7 +888,7 @@ static ex hensel_univar(const ex& a_, const ex& x, unsigned int p, const UniPoly for ( int i=a.degree(x); i>=a.ldegree(x); --i ) { maxcoeff += pow(abs(a.coeff(x, i)),2); } - cl_I normmc = ceiling1(the(cln::sqrt(ex_to(maxcoeff).to_cl_N()))); + cl_I normmc = ceiling1(the(cln::sqrt(ex_to(maxcoeff).to_cl_N()))); unsigned int maxdegree = (u1_.degree() > w1_.degree()) ? u1_.degree() : w1_.degree(); unsigned int B = cl_I_to_uint(normmc * expt_pos(cl_I(2), maxdegree)); @@ -1233,6 +1233,9 @@ ex factor(const ex& poly) } return res; } + if ( is_a(sfpoly) ) { + return poly; + } // case: (polynomial) ex f = factor_sqrfree(sfpoly); return f;