|
From: Chris S. <san...@us...> - 2005-11-19 16:37:16
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1133/scripts/maxima Modified Files: stackmaxima.mac Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** stackmaxima.mac 19 Nov 2005 16:04:39 -0000 1.50 --- stackmaxima.mac 19 Nov 2005 16:37:08 -0000 1.51 *************** *** 625,628 **** --- 625,657 ---- )$ + + /* A general, all purpose answer test which checks things are of the + same "type". Based upon the results of AtAlgEquivfun(SA,SB) + */ + ATSameType(SA,SB) :=block([ret,oldsimp], + oldsimp:simp, + simp:true, + /* Turn on simplification and error catch */ + SA:errcatch(ev(SA,simp,fullratsimp,nouns)), + if SA=[] then (simp:oldsimp, return(StackReturnOb("false","0","Error simplifing SAns",""))), + SA:SA[1], + SB:errcatch(ev(SB,simp,fullratsimp,nouns)), + if SB=[] then (simp:oldsimp, return(StackReturnOb("false","0","Error simplifing TAns",""))), + SB:SB[1], + /* Start recursive process */ + ret:ATAlgEquivfun(SA,SB), + /* This test gives no feedback */ + ret[3]:"", + ret[4]:"", + /* Send back result */ + if ret[1] then + ret[2]:1 + else + (ret[1]:true,ret[2]:0), + simp:oldsimp, + return(StackReturnOb(string(ret[1]),string(ret[2]),ret[3],ret[4])) + )$ + + /******************************************************************/ |