]> www.ginac.de Git - ginac.git/commitdiff
[bugfix] normalize_in_ring: don't set the leading coefficient to 1.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Mon, 29 Sep 2008 05:53:46 +0000 (09:53 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Tue, 30 Sep 2008 20:04:24 +0000 (00:04 +0400)
The coefficient ring is not a field, so the leading coefficient don't
have to be 1.

ginac/polynomial/normalize.tcc

index e2463075a58586892243210fd453c3e7e746f08a..1f90cc30b32eb591321c9bbd784cc633da1bbc0b 100644 (file)
@@ -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_)