123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876 |
- Sat Jun 29 14:12:16 PDT 1991
- REDUCE 3.4, 15-Jul-91 ...
- 1: 1:
- 2: 2:
- 3: 3: % Test SCOPE Package.
- % NOTE: The SCOPE, GHORNER, GSTRUCTR and GENTRAN packages must be loaded
- % to run these tests.
- on priall$
- optimize z:=a^2*b^2+10*a^2*m^6+a^2*m^2+2*a*b*m^4+2*b^2*m^6+b^2*m^2
- iname s;
- Sumscheme :
- || EC|Far
- ------------
- 0|| 1| Z
- ------------
- Productscheme :
- | 0 1 2| EC|Far
- ---------------------
- 1| 2 2| 1| 0
- 2| 6 2| 10| 0
- 3| 2 2| 1| 0
- 4| 4 1 1| 2| 0
- 5| 6 2 | 2| 0
- 6| 2 2 | 1| 0
- ---------------------
- 0 : M
- 1 : B
- 2 : A
- Number of operations in the input is:
- Number of (+,-)-operations : 5
- Number of (*)-operations : 10
- Number of integer exponentiations : 11
- Number of other operations : 0
- Time: 51 ms
- Breuer search :
- Time: 85 ms
- Removal of different names for identical cse's :
- Time: 17 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Breuer search :
- Time: 34 ms
- Removal of different names for identical cse's :
- Time: 0 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Breuer search :
- Time: 34 ms
- Removal of different names for identical cse's :
- Time: 0 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Additional optimization during finishing touch :
- Time: 0 ms
- S0 := B*A
- S4 := M*M
- S1 := S4*B*B
- S2 := S4*A*A
- S3 := S4*S4
- Z := S1 + S2 + S0*(2*S3 + S0) + S3*(2*S1 + 10*S2)
- Number of operations after optimization is:
- Number of (+,-)-operations : 5
- Number of (*)-operations : 12
- Number of integer exponentiations : 0
- Number of other operations : 0
- Sumscheme :
- | 0 3 4 5| EC|Far
- ------------------------
- 0| 1 1| 1| Z
- 15| 2 10| 1| 14
- 17| 2 1 | 1| 16
- ------------------------
- 0 : S3
- 3 : S0
- 4 : S1
- 5 : S2
- Productscheme :
- | 8 9 10 11 17 18 19 20| EC|Far
- ------------------------------------
- 7| 1 1| 1| S0
- 8| 1 2 | 1| S1
- 9| 1 2| 1| S2
- 10| 2 | 1| S3
- 11| 2 | 1| S4
- 14| 1 | 1| 0
- 16| 1 | 1| 0
- ------------------------------------
- 8 : S4
- 9 : S3
- 10 : S2
- 11 : S1
- 17 : S0
- 18 : M
- 19 : B
- 20 : A
- Time: 51 ms
- off priall$
- on primat,acinfo$
- optimize
- ghorner <<z:=a^2*b^2+10*a^2*m^6+a^2*m^2+2*a*b*m^4+2*b^2*m^6+b^2*m^2>>
- vorder m
- iname s;
- 2 2 2 2 2 2 2 2 2
- Z := A *B + M *((A + B ) + M *(2*A*B + M *(10*A + 2*B )))
- Sumscheme :
- || EC|Far
- ------------
- 0|| 1| Z
- 3|| 1| 2
- 7|| 1| 6
- 10|| 1| 9
- ------------
- Productscheme :
- | 0 1 2| EC|Far
- ---------------------
- 1| 2 2| 1| 0
- 2| 2 | 1| 0
- 4| 2| 1| 3
- 5| 2 | 1| 3
- 6| 2 | 1| 3
- 8| 1 1| 2| 7
- 9| 2 | 1| 7
- 11| 2| 10| 10
- 12| 2 | 2| 10
- ---------------------
- 0 : M
- 1 : B
- 2 : A
- Number of operations in the input is:
- Number of (+,-)-operations : 5
- Number of (*)-operations : 8
- Number of integer exponentiations : 9
- Number of other operations : 0
- S0 := B*A
- S1 := B*B
- S2 := A*A
- S3 := M*M
- Z := S0*S0 + S3*(S1 + S2 + S3*(2*S0 + S3*(2*S1 + 10*S2)))
- Number of operations after optimization is:
- Number of (+,-)-operations : 5
- Number of (*)-operations : 11
- Number of integer exponentiations : 0
- Number of other operations : 0
- Sumscheme :
- | 0 1 2| EC|Far
- ---------------------
- 0| | 1| Z
- 3| 1 1| 1| 2
- 7| 2 | 1| 6
- 10| 2 10| 1| 9
- ---------------------
- 0 : S0
- 1 : S1
- 2 : S2
- Productscheme :
- | 3 4 5 9 10 11 12| EC|Far
- ---------------------------------
- 1| 2 | 1| 0
- 2| 1 | 1| 0
- 6| 1 | 1| 3
- 9| 1 | 1| 7
- 13| 1 1| 1| S0
- 14| 2 | 1| S1
- 15| 2| 1| S2
- 16| 2 | 1| S3
- ---------------------------------
- 3 : S3
- 4 : S2
- 5 : S1
- 9 : S0
- 10 : M
- 11 : B
- 12 : A
- operator a$
- k:=j:=1$
- u:=c*x+d$
- v:=sin(u)$
- optimize {a(k,j):=v*(v^2*cos(u)^2+u),
- a(k,j)::=:v*(v^2*cos(u)^2+u)} iname s;
- 2 2
- A(K,J) := V*(V *COS(U) + U)
- A(1,1) :=
- 3 2
- SIN(C*X + D) *COS(C*X + D) + SIN(C*X + D)*C*X + SIN(C*X + D)*D
- Sumscheme :
- | 7 8| EC|Far
- ------------------
- 1| 1 | 1| 0
- 3| | 1| S2
- 5| 1| 1| S4
- ------------------
- 7 : U
- 8 : D
- Productscheme :
- | 0 1 2 3 4 5 6| EC|Far
- ---------------------------------
- 0| 1| 1| S0
- 2| 2 2| 1| 1
- 4| 2 3 | 1| 3
- 6| 1 1 | 1| 5
- 7| 1 1 1 | 1| 3
- 8| 1 1 | 1| 3
- ---------------------------------
- 0 : D
- 1 : S5=COS(S4)
- 2 : S3=SIN(S4)
- 3 : X
- 4 : C
- 5 : S1=COS(U)
- 6 : V
- Number of operations in the input is:
- Number of (+,-)-operations : 7
- Number of (*)-operations : 10
- Number of integer exponentiations : 4
- Number of other operations : 5
- S8 := COS(U)*V
- A(K,J) := V*(U + S8*S8)
- S4 := X*C + D
- S3 := SIN(S4)
- S9 := COS(S4)*S3
- A(1,1) := S3*(S4 + S9*S9)
- Number of operations after optimization is:
- Number of (+,-)-operations : 3
- Number of (*)-operations : 7
- Number of integer exponentiations : 0
- Number of other operations : 3
- Sumscheme :
- | 2 3 12 13| EC|Far
- ------------------------
- 1| 1 | 1| 0
- 3| | 1| S2
- 5| 1 1| 1| S4
- 11| 1 | 1| 10
- ------------------------
- 2 : S4
- 3 : S6
- 12 : U
- 13 : D
- Productscheme :
- | 0 1 4 5 6 7 8 9 10 11| EC|Far
- ------------------------------------------
- 0| 1| 1| S0
- 2| 2 | 1| 1
- 4| 2 | 1| 11
- 9| 1 1 | 1| S6
- 10| 1 | 1| 3
- 13| 1 1| 1| S8
- 14| 1 1 | 1| S9
- ------------------------------------------
- 0 : S9
- 1 : S8
- 4 : S6
- 5 : D
- 6 : S5=COS(S4)
- 7 : S3=SIN(S4)
- 8 : X
- 9 : C
- 10 : S1=COS(U)
- 11 : V
- off exp$
- optimize {a(k,j):=v*(v^2*cos(u)^2+u),
- a(k,j)::=:v*(v^2*cos(u)^2+u)} iname s;
- 2 2
- A(K,J) := V*(V *COS(U) + U)
- 2 2
- A(1,1) := (SIN(C*X + D) *COS(C*X + D) + C*X + D)*SIN(C*X + D)
- Sumscheme :
- | 6 7| EC|Far
- ------------------
- 1| 1 | 1| 0
- 4| 1| 1| 3
- 6| 1| 1| S4
- ------------------
- 6 : U
- 7 : D
- Productscheme :
- | 0 1 2 3 4 5| EC|Far
- ------------------------------
- 0| 1| 1| S0
- 2| 2 2| 1| 1
- 3| 1 | 1| S2
- 5| 2 2 | 1| 4
- 7| 1 1 | 1| 6
- 8| 1 1 | 1| 4
- ------------------------------
- 0 : S5=COS(S4)
- 1 : S3=SIN(S4)
- 2 : X
- 3 : C
- 4 : S1=COS(U)
- 5 : V
- Number of operations in the input is:
- Number of (+,-)-operations : 6
- Number of (*)-operations : 8
- Number of integer exponentiations : 4
- Number of other operations : 4
- S8 := COS(U)*V
- A(K,J) := V*(U + S8*S8)
- S4 := X*C + D
- S3 := SIN(S4)
- S9 := COS(S4)*S3
- A(1,1) := S3*(S4 + S9*S9)
- Number of operations after optimization is:
- Number of (+,-)-operations : 3
- Number of (*)-operations : 7
- Number of integer exponentiations : 0
- Number of other operations : 3
- Sumscheme :
- | 2 3 11 12| EC|Far
- ------------------------
- 1| 1 | 1| 0
- 4| 1 | 1| 3
- 6| 1 1| 1| S4
- ------------------------
- 2 : S4
- 3 : S6
- 11 : U
- 12 : D
- Productscheme :
- | 0 1 4 5 6 7 8 9 10| EC|Far
- ---------------------------------------
- 0| 1| 1| S0
- 2| 2 | 1| 1
- 3| 1 | 1| S2
- 5| 2 | 1| 4
- 9| 1 1 | 1| S6
- 11| 1 1| 1| S8
- 12| 1 1 | 1| S9
- ---------------------------------------
- 0 : S9
- 1 : S8
- 4 : S6
- 5 : S5=COS(S4)
- 6 : S3=SIN(S4)
- 7 : X
- 8 : C
- 9 : S1=COS(U)
- 10 : V
- off primat,acinfo,period$
- on fort$
- optimize z:=(6*a+18*b+9*c+3*d+6*e+18*f+6*g+5*h+5*k+3)^13 iname s;
- S0=5.0*(H+K)+3.0*(3.0*C+D+1.0+6.0*(B+F)+2.0*(A+EXP(1.0)+G))
- S3=S0*S0*S0
- S2=S3*S3
- Z=S0*S2*S2
- optimize {x:=3*a*p,y:=3*a*q,z:=6*a*r+2*b*p,u:=6*a*d+2*b*q,
- v:=9*a*c+4*b*d,w:=4*b} iname s;
- S2=3.0*A
- X=S2*P
- Y=S2*Q
- S1=2.0*B
- S3=6.0*A
- Z=S1*P+S3*R
- U=S1*Q+S3*D
- S0=4.0*B
- V=S0*D+9.0*C*A
- W=S0
- off fort$
- clear a$
- matrix a(2,2)$
- a(1,1):=x+y+z$
- a(1,2):=x*y$
- a(2,1):=(x+y)*x*y$
- a(2,2):=(x+2*y+3)^3-x$
- on acinfo$
- optimize gstructr<<a;
- aa:=(x+y)^2;b:=(x+y)*(y+z);c:=(x+2*y)*(y+z)*(z+x)^2>>
- name v iname s;
- A(1,1) := X + Y + Z
- A(1,2) := X*Y
- V2 := X + Y
- A(2,1) := V2*X*Y
- 3
- A(2,2) := (X + 2*Y + 3) - X
- 2
- AA := V2
- V5 := Y + Z
- B := V2*V5
- 2
- C := (X + 2*Y)*(X + Z) *V5
- Number of operations in the input is:
- Number of (+,-)-operations : 9
- Number of (*)-operations : 8
- Number of integer exponentiations : 3
- Number of other operations : 0
- S5 := X + Z
- A(1,1) := S5 + Y
- S8 := Y*X
- A(1,2) := S8
- V2 := X + Y
- A(2,1) := S8*V2
- S6 := X + 2*Y
- S4 := S6 + 3
- A(2,2) := S4*S4*S4 - X
- AA := V2*V2
- V5 := Y + Z
- B := V5*V2
- C := S6*S5*S5*V5
- Number of operations after optimization is:
- Number of (+,-)-operations : 7
- Number of (*)-operations : 10
- Number of integer exponentiations : 0
- Number of other operations : 0
- clear a$
- off fort;
- on priall$
- optimize z:=:for j:=2:6 sum a^(1/j) iname s;
- 1/3 1/4 1/5 1/6
- Z := (((A + SQRT(A)) + A ) + A ) + A
- Sumscheme :
- || EC|Far
- ------------
- 0|| 1| Z
- ------------
- Productscheme :
- | 0| EC|Far
- ---------------
- 1| 20| 1| 0
- 2| 30| 1| 0
- 3| 15| 1| 0
- 4| 12| 1| 0
- 5| 10| 1| 0
- ---------------
- 0 : A
- Number of operations in the input is:
- Number of (+,-)-operations : 4
- Number of (*)-operations : 0
- Number of integer exponentiations : 0
- Number of other operations : 5
- Time: 1717 ms
- Breuer search :
- Time: 102 ms
- Removal of different names for identical cse's :
- Time: 0 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Breuer search :
- Time: 34 ms
- Removal of different names for identical cse's :
- Time: 17 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Breuer search :
- Time: 34 ms
- Removal of different names for identical cse's :
- Time: 0 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Breuer search :
- Time: 17 ms
- Removal of different names for identical cse's :
- Time: 0 ms
- Change Scheme :
- Time: 0 ms
- Local Factorization :
- Time: 0 ms
- Additional optimization during finishing touch :
- Time: 0 ms
- 1/60
- A := A
- S7 := A*A
- S6 := S7*A
- S4 := S7*S6
- S2 := S4*S4
- S1 := S7*S2
- S0 := S6*S1
- S3 := S4*S0
- Z := S2 + S1 + S0 + S3 + S3*S2
- Number of operations after optimization is:
- Number of (+,-)-operations : 4
- Number of (*)-operations : 8
- Number of integer exponentiations : 0
- Number of other operations : 1
- Sumscheme :
- | 3 4 5 6| EC|Far
- ------------------------
- 0| 1 1 1 1| 1| Z
- ------------------------
- 3 : S2
- 4 : S1
- 5 : S0
- 6 : S3
- Productscheme :
- | 9 10 12 13 14 15 16 22| EC|Far
- ------------------------------------
- 2| 1 1 | 1| 0
- 6| 1 1 | 1| S0
- 7| 1 1 | 1| S1
- 8| 2 | 1| S2
- 9| 1 1 | 1| S3
- 10| 1 1 | 1| S4
- 12| 1 1| 1| S6
- 13| 2| 1| S7
- ------------------------------------
- 9 : S7
- 10 : S6
- 12 : S4
- 13 : S3
- 14 : S2
- 15 : S1
- 16 : S0
- 22 : A
- Time: 34 ms
- off acinfo,priall$
- on optdecs$
- optlang!*:='fortran$
- optimize {x(i+1,i-1):=a(i+1,i-1)+b(i),y(i-1):=a(i-1,i+1)-b(i)} iname s
- declare <<x(4),a(4,4),y(5):real;b(5):integer>>;
- INTEGER B(5),I,S1,S2
- REAL A(4,4),S4,X(4),Y(5)
- S1=I+1.0
- S2=I-1.0
- S4=B(I)
- X(S1,S2)=A(S1,S2)+S4
- Y(S2)=A(S2,S1)-S4
- optlang!*:='c$
- optimize {x(i+1,i-1):=a(i+1,i-1)+b(i),y(i-1):=a(i-1,i+1)-b(i)} iname s
- declare <<x(4),a(4,4),y(5):real;b(5):integer>>;
- int B[6],I,S1,S2;
- float A[5][5],S4,X[5],Y[6];
- {
- S1=I+1.0;
- S2=I-1.0;
- S4=B[I];
- X[S1][S2]=A[S1][S2]+S4;
- Y[S2]=A[S2][S1]-S4;
- }
- optlang!*:= 'pascal$
- optimize {x(i+1,i-1):=a(i+1,i-1)+b(i),y(i-1):=a(i-1,i+1)-b(i)} iname s
- declare <<x(4),a(4,4),y(5):real;b(5):integer>>;
- VAR
- S2,S1,I: INTEGER;
- B: ARRAY[0..5] OF INTEGER;
- S4: REAL;
- Y: ARRAY[0..5] OF REAL;
- X: ARRAY[0..4] OF REAL;
- A: ARRAY[0..4,0..4] OF REAL;
- BEGIN
- S1:=I+1.0;
- S2:=I-1.0;
- S4:=B[I];
- X[S1,S2]:=A[S1,S2]+S4;
- Y[S2]:=A[S2,S1]-S4
- END;
- optlang!*:='ratfor$
- optimize {x(i+1,i-1):=a(i+1,i-1)+b(i),y(i-1):=a(i-1,i+1)-b(i)} iname s
- declare <<x(4),a(4,4),y(5):real;b(5):integer>>;
- INTEGER B(5),I,S1,S2
- REAL A(4,4),S4,X(4),Y(5)
- {
- S1=I+1.0
- S2=I-1.0
- S4=B(I)
- X(S1,S2)=A(S1,S2)+S4
- Y(S2)=A(S2,S1)-S4
- }
- end;
- 4: 4:
- Quitting
- Sat Jun 29 14:12:22 PDT 1991
|