X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fpolynomial%2Fprimpart_content.cpp;h=95fb268f272ff7fa40433799ecd807a85d630263;hb=39eceef41403ae77569110626f1fc957243228b7;hp=44924e2d167984b5acfbf3c3826c3ecb6c60514a;hpb=1602530f716ba1d425a0667b897182b99c374823;p=ginac.git diff --git a/ginac/polynomial/primpart_content.cpp b/ginac/polynomial/primpart_content.cpp index 44924e2d..95fb268f 100644 --- a/ginac/polynomial/primpart_content.cpp +++ b/ginac/polynomial/primpart_content.cpp @@ -3,7 +3,7 @@ * Function to find primitive part of a multivariate polynomial. */ /* - * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2018 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 @@ -62,13 +62,13 @@ void primpart_content(ex& pp, ex& c, ex e, const exvector& vars, // p_1(x_n) p_2(x_0, \ldots, x_{n-1}) c = ec.rbegin()->second; ec.rbegin()->second = ex1; - pp = ex_collect_to_ex(ec, vars).expand().smod(numeric(p)); + pp = ex_collect_to_ex(ec, rest_vars).expand().smod(numeric(p)); return; } // Start from the leading coefficient (which is stored as a last // element of the terms array) - ex_collect_t::reverse_iterator i = ec.rbegin(); + auto i = ec.rbegin(); ex g = i->second; // there are at least two terms, so it's safe to... ++i;