diff options
Diffstat (limited to 'src/algebra/manip.spad.pamphlet')
-rw-r--r-- | src/algebra/manip.spad.pamphlet | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/algebra/manip.spad.pamphlet b/src/algebra/manip.spad.pamphlet index a9f207d7..83657f90 100644 --- a/src/algebra/manip.spad.pamphlet +++ b/src/algebra/manip.spad.pamphlet @@ -624,10 +624,13 @@ TranscendentalManipulations(R, F): Exports == Implementation where -- like to combine it with a log term. terms :List F := [simplifyLog(term) for term in termList::List(F)] exprs :List F := [] - for i in 1..#terms repeat - if retractIfCan(terms.i)@Union(FPR,"failed") case FPR then - exprs := cons(terms.i,exprs) - terms := delete!(terms,i) + nterms :List F := [] + for term in terms repeat + if retractIfCan(term)@Union(FPR,"failed") case FPR then + exprs := cons(term, exprs) + else + nterms := cons(term, nterms) + terms := nterms if not empty? exprs then foundLog := false i : NonNegativeInteger := 0 |