123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728 |
- Tue Mar 6 13:52:20 PST 2001
- Loading image file :/home/hearn/reddist/reduce3.7/lisp/psl/linux/red/reduce.img
- REDUCE 3.7, 15-Apr-1999, patched to 6-Mar-2001 ...
- 1:
- 2: 2: 2: 2: 2: 2: 2:
- 3: 3: % This file tests some of the patches included in the patches.red file.
- % If the latter file has been correctly installed, none of these should
- % give an error.
- % 7 Aug 99.
- % This did not terminate.
- df(tan((sqrt(1-x^2)*asin acos x + 2*sqrt(1-x^2)*x)/x),x);
- 4
- ( - acos(x) *asin(acos(x))
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2
- *tan(-----------------------------------------------------)
- x
- 4
- - acos(x) *asin(acos(x))
- 2 2
- 4 sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2 3
- - 2*acos(x) *tan(-----------------------------------------------------) *x
- x
- 4 3 2
- - 2*acos(x) *x + 2*acos(x) *asin(acos(x))
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2
- *tan(-----------------------------------------------------)
- x
- 2 2 2 2
- + 2*acos(x) *asin(acos(x)) + sqrt( - x + 1)*sqrt( - acos(x) + 1)*acos(x)
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2
- *tan(-----------------------------------------------------) *x
- x
- 2 2 2
- + sqrt( - x + 1)*sqrt( - acos(x) + 1)*acos(x) *x
- 2 2
- 2 sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2 3
- + 4*acos(x) *tan(-----------------------------------------------------) *x
- x
- 2 3
- + 4*acos(x) *x
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2
- - asin(acos(x))*tan(-----------------------------------------------------)
- x
- 2 2
- - asin(acos(x)) - sqrt( - x + 1)*sqrt( - acos(x) + 1)
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2
- *tan(-----------------------------------------------------) *x
- x
- 2 2
- - sqrt( - x + 1)*sqrt( - acos(x) + 1)*x
- 2 2
- sqrt( - x + 1)*asin(acos(x)) + 2*sqrt( - x + 1)*x 2 3 3
- - 2*tan(-----------------------------------------------------) *x - 2*x )/(
- x
- 2 2 4 2
- sqrt( - x + 1)*x *(acos(x) - 2*acos(x) + 1))
- % 20 Oct 99.
- % This gave a wrong answer.
- a1:=12x^2-16x+3;
- 2
- a1 := 12*x - 16*x + 3
- a2:=3x-4;
- a2 := 3*x - 4
- off mcd;
- on combineexpt;
- e^(a1/a2);
- -1 2 -1 -1
- 12*(3*x - 4) *x - 16*(3*x - 4) *x + 3*(3*x - 4)
- e
- on mcd;
- off combineexpt;
- clear a1,a2;
- % 8 Nov 99.
- % This gave a catastrophic error.
- factorize(2*c*s*u^3*v^5-2*c*s*u^3*v +2*c*s*u*v^5-2*c*s*u*v
- -s^2*u^4*v^4+s^2*u^4+s^2*u^2*v^6-s^2*u^2*v^4-s^2*u^2*v^2
- +s^2*u^2 +s^2*v^6-s^2*v^2+u^4*v^4-u^4*v^2 -v^4+v^2);
- 3 2 2 2 2 2 2 4 2 2 2 2 2
- {{2*c*s*u*v + 2*c*s*u*v - s *u *v - s *u + s *v + s *v + u *v - v ,
- 1},
- 2
- {u + 1,1},
- {v + 1,1},
- {v - 1,1}}
- % 18 Dec 99.
- % The following integration generated a catastrophic error.
- load_package numeric;
- on rounded;
- f := exp(10*exp(-x)*(x+1-0.1))$
- num_int(f,x=(0 .. 300));
- 5615.56420985
- off rounded;
- clear f;
- % 31 Jan 00.
- % This gave an error that x was invalid as a kernel.
- weight x=1,y=1;
- {}
- wtlevel 10;
- 1
- factor x;
- symbolic(wtl!* := asymplis!* := nil);
- remfac x;
- % 5 Feb 00.
- % This gave a spurious error.
- matx := mat((1,2));
- matx := [1 2]
- sign sqrt 42;
- 1
- % 6 Feb 00.
- % This gave a wrong answer.
- on complex;
- sqrt(i*sqrt(3)-1);
- sqrt(2)*(i*sqrt(3) + 1)
- -------------------------
- 2
- off complex;
- % 10 Feb 00.
- % This gave the error that "***** x= - 2.61803398875 invalid as scalar."
- on rounded,fullroots;
- solve(x^3+4*x^2+4*x+1,x);
- {x= - 2.61803398875,x= - 0.38196601125,x=-1}
- off rounded,fullroots;
- % 18 Feb 00.
- % This used to cause a type mismatch error.
- m := mat((a,b),(c,d));
- [a b]
- m := [ ]
- [c d]
- det sub(a=1,m);
- - b*c + d
- % 18 Apr 00.
- % matchlength!* can now be set to match more products.
- for all a let opr(a*v) = a*opr(v);
- *** opr declared operator
- opr(a1*a2*a3*a4*a5*v);
- opr(a1*a2*a3*a4*a5*v)
- matchlength!* := 6;
- matchlength* := 6
- opr(a1*a2*a3*a4*a5*v);
- opr(v)*a1*a2*a3*a4*a5
- % 22 Apr 00;
- % This example created a long list in oldrules!*.
- procedure hu (x); wq(x) := x^2;
- hu
- wq(2) := 20;
- *** wq declared operator
- wq(2) := 20
- for i:=1:1000 do hu i;
- for i:=1:1000 do hu i;
- lisp length oldrules!*;
- 0
- % 28 Jul 00.
- % A sum index within a derivative was treated as an identifier.
- sum(x^n/factorial n*sub(x=0,df(cos x,x,n)),n,0,5);
- 4 2
- x - 12*x + 24
- -----------------
- 24
- % 2 Aug 00.
- % With complex on, some factorizations seemed to run forever.
- on complex;
- factorize (400*y^12+400*y^10*z+40*y^9*z^2+100*y^8*z^2
- +20*y^7*z^5+120*y^7*z^4+20*y^7*z^3+41*y^6*z^4+60*y^5*z^7
- +60*y^5*z^5+20*y^4*z^7+6*y^4*z^6+20*y^4*z^5
- +2*y^3*z^6+9*y^2*z^8+6*y*z^8+z^8);
- 12 10 9 2 8 2 7 5 7 4 7 3
- {{400*y + 400*y *z + 40*y *z + 100*y *z + 20*y *z + 120*y *z + 20*y *z
- 6 4 5 7 5 5 4 7 4 6 4 5 3 6
- + 41*y *z + 60*y *z + 60*y *z + 20*y *z + 6*y *z + 20*y *z + 2*y *z
- 2 8 8 8
- + 9*y *z + 6*y*z + z ,
- 1}}
- off complex;
- % 29 Aug 00.
- % This caused a segmentation violation or similar error.
- load_package gentran,scope;
- matrix aaa(10,10);
- on gentranopt;
- gentran aaa(1,1) ::=: aaa(1,1);
- real aaa(n,n)
- aaa(1,1)=0.0
- t
- off gentranopt;
- % 19 Sep 00.
- % This used to give a spurious "not found" message.
- sqrt_:= {sqrt(~x/~y) => sqrt x/sqrt y};
- ~x sqrt(x)
- sqrt_ := {sqrt(----) => ---------}
- ~y sqrt(y)
- clearrules sqrt_;
- clear sqrt_;
- % 20 Sep 00.
- % The following caused a catastrophic error.
- load_package algint;
- int(1/sqrt((2*e^c-y)/(e^c*y)),y);
- c
- c/2 c c sqrt(2*e - y)
- e *( - sqrt(y)*sqrt(2*e - y) + e *int(--------------------------,y))
- c
- 2*sqrt(y)*e - sqrt(y)*y
- % 8 Nov 00.
- % The following did not optimize completely.
- load_package scope;
- dX1 := - sqrt(abs(k_l*mttx1 - k_l*mttx2))*sign(k_l*mttx1 - k_l*mttx2)*f*mttu5 +
- sqrt(abs(k_l*mttx1 - k_s*mttx3 - mttu3))*
- sign( - k_l*mttx1 + k_s*mttx3 + mttu3)*f*mttu6 +
- sqrt(abs(k_l*mttx1 - k_s*mttx4 - mttu4))*
- sign( - k_l*mttx1 + k_s*mttx4 + mttu4)*f*mttu7 - mttu2$
- dX2 := sqrt(abs(k_l*mttx1 - k_l*mttx2))*sign(k_l*mttx1 - k_l*mttx2)*f*mttu5
- - sqrt(abs(k_l*mttx2 - k_s*mttx3))*sign(k_l*mttx2 - k_s*mttx3)*f*mttu8
- - sqrt(abs(k_l*mttx2 - k_s*mttx4))*sign(k_l*mttx2 - k_s*mttx4)*f*mttu9 +
- mttu1$
- dX3 := f*( - sqrt(abs(k_l*mttx1 - k_s*mttx3 - mttu3))*
- sign( - k_l*mttx1 + k_s*mttx3 + mttu3)*mttu6 +
- sqrt(abs(k_l*mttx2 - k_s*mttx3))*
- sign(k_l*mttx2 - k_s*mttx3)*mttu8)$
- dX4 := f*( - sqrt(abs(k_l*mttx1 - k_s*mttx4 - mttu4))*
- sign( - k_l*mttx1 + k_s*mttx4 + mttu4)*mttu7 +
- sqrt(abs(k_l*mttx2 - k_s*mttx4))*
- sign(k_l*mttx2 - k_s*mttx4)*mttu9)$
- optimize
- dX1 :=: dX1,
- dX2 :=: dX2,
- dX3 :=: dX3,
- dX4 :=: dX4
- iname s$
- s31 := mttx2*k_l
- s33 := mttx1*k_l
- s3 := s33 - s31
- s32 := mttx3*k_s
- s7 := s32 - s33 + mttu3
- s30 := mttx4*k_s
- s11 := s30 - s33 + mttu4
- s26 := mttu7*sign(s11)*sqrt(abs( - s11))*f
- s28 := mttu6*sign(s7)*sqrt(abs( - s7))*f
- s29 := mttu5*f*sign(s3)*sqrt(abs(s3))
- dx1 := s26 + s28 - s29 - mttu2
- s15 := s31 - s32
- s19 := s31 - s30
- s25 := mttu9*sign(s19)*sqrt(abs(s19))*f
- s27 := mttu8*sign(s15)*sqrt(abs(s15))*f
- dx2 := s29 + mttu1 - s25 - s27
- dx3 := s27 - s28
- dx4 := s25 - s26
- remprop('!:rd!:,'intequivfn);
- rdintequiv
- % 20 Nov 00.
- % This used to return results in the wrong order.
- noncom u,v;
- sum(u(n)*v(1-n),n,0,1);
- *** u declared operator
- *** v declared operator
- u(1)*v(0) + u(0)*v(1)
- % 13 Dec 00.
- % This used to go into an infinite loop.
- on numval,rounded;
- y:=x^4+x3*x^3+x2*x^2+x1*x+x0;
- 4 3 2
- y := x + x *x3 + x *x2 + x*x1 + x0
- on fullroots;
- % This one takes a long time.
- % solve(y,x)$
- off numval,rounded,fullroots;
- clear y;
- % 9 Jan 01.
- solve({y=x+t^2,x=y+u^2},{x,y,u,t});
- 2
- {{x=y - t ,
- y=arbcomplex(4),
- u=t*i,
- t=arbcomplex(3)},
- 2
- {x=y - t ,
- y=arbcomplex(2),
- u= - t*i,
- t=arbcomplex(1)}}
- % 14 Jan 01.
- % This caused an error.
- resultant(p^3-3p^2-a,3p*(p-2),p);
- 27*a*(a + 4)
- % 19 Jan 01.
- % Some algebraic integrals could produce a catastrophic error.
- % Unfortunately, there is no simple example of this problem.
- % 22 Jan 01.
- % This used to give a spurious zero divisor error.
- int((sqrt((-sqrt(a^4*x^2+4)+a^2*x)/(2*x))
- *(-sqrt(a^4*x^2+4)*a^2*x-a^4*x^2-4))/(2*(a^4*x^2+4)),x);
- 4 2 2
- sqrt( - sqrt(a *x + 4) + a *x)
- (sqrt(2)*( - 4*int(---------------------------------,x)
- 4 2
- sqrt(x)*a *x + 4*sqrt(x)
- 4 2 2
- sqrt(x)*sqrt( - sqrt(a *x + 4) + a *x)*x 4
- - int(-------------------------------------------,x)*a
- 4 2
- a *x + 4
- 4 2 4 2 2
- sqrt(x)*sqrt(a *x + 4)*sqrt( - sqrt(a *x + 4) + a *x) 2
- - int(---------------------------------------------------------,x)*a
- 4 2
- a *x + 4
- ))/4
- % This used to return an incorrect result.
- noncom q;
- 1/mat((1,0,0),(x/p*q 1,1,0),(x*y/(2p*(p-1))*q 1*q 1,y/(p-2)*q 1,1));
- *** q declared operator
- [ 1 0 0]
- [ ]
- [ - x*q(1) ]
- [ ----------- 1 0]
- [ p ]
- [ ]
- [ 2 ]
- [ x*y*q(1) - y*q(1) ]
- [------------------ ----------- 1]
- [ 2 p - 2 ]
- [ 2*(p - 3*p + 2) ]
- % 2 Feb 01.
- % This used to give a spurious zero divisor error.
- solve(sqrt x*sqrt((4x^2*x+1)/x)-1=0,x);
- {x=0}
- % 9 Feb 01.
- % The patched version of combine!-logs included an undefined macro.
- % No test is included for this.
- % 20 Feb 01.
- % Even with combineexpt on, some expressions did not simplify adequately.
- on combineexpt;
- a*a^x;
- x + 1
- a
- e*e^(2/(2-x));
- (x - 4)/(x - 2)
- e
- e^(x+3)*e^(3/(4-3*x))/e^(5*x-3);
- 2
- ( - 12*x + 34*x - 27)/(3*x - 4)
- e
- off combineexpt;
- % 6 Mar 01.
- % This produced a stream of "***** Unexpected algebraic" messages and
- % then aborted.
- int((x^(2/3)*sqrt(sqrt(y)*sqrt(pi) + 2*pi*y*x)*sqrt( - sqrt(y)*sqrt(pi)
- + 2pi*y*x))/(4pi*y*x^3 - x),x);
- sqrt(sqrt(y)*sqrt(pi) + 2*pi*x*y)*sqrt( - sqrt(y)*sqrt(pi) + 2*pi*x*y)
- int(------------------------------------------------------------------------,x)
- 1/3 2 1/3
- 4*x *pi*x *y - x
- end;
- 4: 4: 4: 4: 4: 4: 4: 4: 4:
- Time for test: 30720 ms, plus GC time: 1070 ms
- 5: 5:
- Quitting
- Tue Mar 6 13:52:51 PST 2001
|