From: Alexei Sheplyakov Date: Mon, 29 Sep 2008 05:53:46 +0000 (+0400) Subject: [bugfix] normalize_in_ring: don't set the leading coefficient to 1. X-Git-Tag: release_1-5-0~57 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=d5c76f155cfbd25ccfd14735b6d1041e23214a86;ds=inline [bugfix] normalize_in_ring: don't set the leading coefficient to 1. The coefficient ring is not a field, so the leading coefficient don't have to be 1. --- diff --git a/ginac/polynomial/normalize.tcc b/ginac/polynomial/normalize.tcc index e2463075..1f90cc30 100644 --- a/ginac/polynomial/normalize.tcc +++ b/ginac/polynomial/normalize.tcc @@ -78,8 +78,7 @@ normalize_in_ring(T& x, typename T::value_type* content_ = 0, int* unit_ = 0) return something_changed; } - lcoeff(x) = one; - for (std::size_t i = x.size() - 1; i-- != 0; ) + for (std::size_t i = x.size(); i-- != 0; ) x[i] = exquo(x[i], content); if (content_)