git://www.ginac.de
/
ginac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceb6312
)
[bugfix] normalize_in_ring: don't set the leading coefficient to 1.
author
Alexei Sheplyakov
<varg@theor.jinr.ru>
Mon, 29 Sep 2008 05:53:46 +0000
(09:53 +0400)
committer
Alexei 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
patch
|
blob
|
history
diff --git
a/ginac/polynomial/normalize.tcc
b/ginac/polynomial/normalize.tcc
index e2463075a58586892243210fd453c3e7e746f08a..1f90cc30b32eb591321c9bbd784cc633da1bbc0b 100644
(file)
--- 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_)