|
|
last edited 16 years ago by japp |
1 2 3 4 5 6 7 | ||
Editor: alfredo
Time: 2008/08/28 18:36:43 GMT-7 |
||
Note: |
added:
From wh-sandbox:
\begin{verbatim}
--- branches/wh-sandbox/src/algebra/manip.spad.pamphlet 2006/11/15 17:26:27 263
+++ branches/wh-sandbox/src/algebra/manip.spad.pamphlet 2006/12/12 03:05:14 397
@@ -623,10 +623,13 @@
-- 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
\end{verbatim}
simplifyLog(2*sqrt(2)*log(2))
(1) |
It's perhaps necessary to add exprs := reverse! exprs at the end of the loop, if we want to remain the order of the terms.
FMy?.
Category: Axiom Interpreter => Axiom Library Status: open => fix proposed Status: fix proposed => fixed somewhereno patch available
From wh-sandbox: