"" X=poly("X"); p=(X-2)^6; (test0000=2^-60==rpeval(p,2+2^-10))?"Test 00.00: rpeval ok":"Test 00.00: rpeval failed" test00=test0000; X=poly("X"); i=complex(0,1); p=X^4-(5+3*i)*X^3+(6+7*i)*X*X-(54-22*i)*X+120+90*i; (test0100=(5<=re(cpzero(p,4))) & (0<=im(cpzero(p,4))))?"Test 01.00: cpzero ok":"Test 01.00: cpzero failed" test01=test0100; A=1.*BoothroydDecker(6);b=[1;2;3;4;5;6]; (test0200=A*linsys(A,b)-b==[0;0;0;0;0;0])?"Test 02.00: linsys ok":"Test 02.00: linsys failed" test02=test0200; A=[1 0 1 0 0;0 1 0 1 0;100 18 0 0 1];b=[50;200;5000];c=[50;9;0;0;0]; E=RevSimplex(A,b,c); (test0300=E==[[14;200;36;0;0];[1;3;2];2500;""])?"Test 03.00: RvSimplex ok":"Test 03.00: RvSimplex failed" bstart=E(2); F=LinOpt(A,b,c,bstart); (test0301=F==[2500;[1 2 3;1 2 4;1 3 4];[14 200 36 0 0;50 0 0 200 0;50 0 0 200 0];3;""])?"Test 03.01: LinOpt ok":"Test 03.01: LinOpt failed" test03=test0300 & test 0301; "" "---------------------------------------------" "---------------- Test Summary ---------------" "---------------------------------------------" "" version "" toolboxtest=test00&test01&test02&test03; toolboxtest?"Toolbox tests passed.":"Toolbox tests failed." "" quit