X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Fexam_factor.cpp;h=8851b7cc2f2c9fedd59d52f91838866f14cf48fe;hb=ceb63120f43b41b62dcb0328231a3137d666161b;hp=fa895c6dc06d7fc521e533ec604f443bd1c36d34;hpb=bb6b3d82cdf9e7ff4ecac89c47e63024e39ec96b;p=ginac.git diff --git a/check/exam_factor.cpp b/check/exam_factor.cpp index fa895c6d..8851b7cc 100644 --- a/check/exam_factor.cpp +++ b/check/exam_factor.cpp @@ -101,6 +101,68 @@ static unsigned exam_factor1() e = ex("(1+4*x)*x^2*(1-4*x+16*x^2)*(3+5*x+92*x^3)", syms); result += check_factor(e); + e = ex("(77+11*x^3+25*x^2+27*x+102*x^4)*(85+57*x^3+92*x^2+29*x+66*x^4)", syms); + result += check_factor(e); + + return result; +} + +static unsigned exam_factor2() +{ + unsigned result = 0; + ex e, d; + symbol x("x"), y("y"), z("z"); + lst syms; + syms = x, y, z; + + e = ex("x+y", syms); + result += check_factor(e); + + e = ex("(x^2-y+1)*(x+y)", syms); + result += check_factor(e); + + e = ex("-2*(x+y)*(x-y)", syms); + result += check_factor(e); + + e = ex("(16+x^2*z^3)*(-17+3*x-5*z)*(2*x+3*z)*(x-y^2-z^3)", syms); + result += check_factor(e); + + e = ex("(x-y*z)*(x-y^2-z^3)*(x+y+z)", syms); + result += check_factor(e); + + e = ex("-(y^2-x+z^3)*x*(x+y+z)", syms); + result += check_factor(e); + + e = ex("-316*(3*x-4*z)*(2*x+3*z)*(x+y)*(-1+x)", syms); + result += check_factor(e); + + e = ex("(x+x^3+z^2)*(3*x-4*z)", syms); + result += check_factor(e); + + e = ex("250*(-3+x)*(4*z-3*x)*(x^3+z^2+x)*x", syms); + result += check_factor(e); + + e = ex("327*(x+z^2+x^3)*(3*x-4*z)*(-7+5*x-x^3)*(1+x+x^2)", syms); + result += check_factor(e); + + e = ex("x-y^2-z^3", syms); + result += check_factor(e); + + e = ex("-390*(7+3*x^4)*(2+x^2)*(x-z^3-y^2)", syms); + result += check_factor(e); + + e = ex("55*(1+x)^2*(3*x-4*z)*(1+x+x^2)*(x+x^3+z^2)", syms); + result += check_factor(e); + + e = ex("x+y*x-1", syms); + result += check_factor(e); + + e = ex("390*(-1+x^6-x)*(7+3*x^4)*(2+x^2)*(y+x)*(-1+y-x^2)*(1+x^2+x)^2", syms); + result += check_factor(e); + + e = ex("310*(y+x)*(-1+y-x^2)", syms); + result += check_factor(e); + return result; } @@ -111,6 +173,7 @@ unsigned exam_factor() cout << "examining polynomial factorization" << flush; result += exam_factor1(); cout << '.' << flush; + result += exam_factor2(); cout << '.' << flush; return result; }