X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_factor.cpp;h=c848fdd4ebc2ca6f9a29cd717366535dad2a1730;hp=c1e98e7072d13a840821085b64ba43de72cda66c;hb=cdddbc6dcdabef73aeb20bb9b81e08dba92a235c;hpb=c2ef6cb074a85957bd684337552fe9d84451d307 diff --git a/check/exam_factor.cpp b/check/exam_factor.cpp index c1e98e70..c848fdd4 100644 --- a/check/exam_factor.cpp +++ b/check/exam_factor.cpp @@ -26,8 +26,6 @@ using namespace GiNaC; #include using namespace std; -static symbol w("w"), x("x"), y("y"), z("z"); - static unsigned check_factor(const ex& e) { ex ee = e.expand(); @@ -44,8 +42,7 @@ static unsigned exam_factor1() unsigned result = 0; ex e; symbol x("x"); - lst syms; - syms.append(x); + lst syms = {x}; e = ex("1+x-x^3", syms); result += check_factor(e); @@ -199,7 +196,7 @@ static unsigned exam_factor_wang() // "An Improved Multivariate Polynomial Factoring Algorithm" unsigned result = 0; ex e; - symbol x("x"), y("y"), z("z"), u("u"); + symbol u("u"), w("w"), x("x"), y("y"), z("z"); e = ex("(z+x*y+10)*(x*z+y+30)*(y*z+x+20)", lst{x, y, z}); result += check_factor_expanded(e);