diff --git a/src/algebra/poly.spad b/src/algebra/poly.spad
index b67beeb..b3768b8 100644
--- a/src/algebra/poly.spad
+++ b/src/algebra/poly.spad
@@ -581,11 +581,11 @@
cons([p.first.k, cf], (a * p.rest))
if R has Ring then
fmecg(p1 : %, e : E, r : R, p2 : %) : % == -- p1 - r * X^e * p2
+ r = 0 => p1
rout : % := []
r := - r
for tm in p2 repeat
c2 := r * tm.c
- c2 = 0 => "next term"
e2 := e + tm.k
while not null p1 and p1.first.k > e2 repeat
(rout := cons(p1.first, rout); p1 := p1.rest) --use
PUSH and POP?
=======
tm.c can't be 0, so "c2 = 0" implies "r = 0", so we can skip
the check in loop.
BTW, using '=> "next term"' is awkward, the axiom book says
we should use 'iterate', but compiler doesn't recognize it anymore.
So we should fix the documentation then? (doc/htex/ug05.htex)
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.