X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Ffactor.cpp;h=2b77d1b0110f3e327216a11a20510b901a6b93ee;hb=709e61093f43462b5816f859a32a31cc00758da8;hp=12e81a8d55cc5bc5603d0df39a6f3c8d11f7ab33;hpb=63f3e977f92d51ea173382a9b7c4c3b18bda7b8e;p=ginac.git diff --git a/ginac/factor.cpp b/ginac/factor.cpp index 12e81a8d..2b77d1b0 100644 --- a/ginac/factor.cpp +++ b/ginac/factor.cpp @@ -33,7 +33,7 @@ */ /* - * GiNaC Copyright (C) 1999-2018 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1953,7 +1953,7 @@ static vector multivar_diophant(const vector& a_, const ex& x, const ex& delta_s[j] = delta_s[j] * modcm; sigma[j] = sigma[j] + umodpoly_to_ex(delta_s[j], x); } - if ( nterms > 1 ) { + if ( nterms > 1 && i+1 != nterms ) { z = c.op(i+1); } }