From: Chris S. <san...@us...> - 2006-08-22 16:48:53
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23028/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.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** stackmaxima.mac 22 Aug 2006 15:04:26 -0000 1.71 --- stackmaxima.mac 22 Aug 2006 16:48:49 -0000 1.72 *************** *** 1221,1230 **** /* An answer test for integration questions.*/ ! /* sa is the students' ansewer, sbl is a list consisting of (1) the integrand, and (2) the variable */ ATInt(sa,sbl) := ! block([old_simp,KEEPFLOAT,RawMark,FeedBack,AnswerNote,str,da,db,dd,dc,sb,var,cont,ans,ex], old_simp:simp, simp:true, RawMark:0, FeedBack:"", AnswerNote:"", /* SBL is a list: the teacher's answer, the variable, and whether formative feedback is to be provided. */ ! if listp(sbl) then (var:sbl[2], sb:diff(sbl[1],var), cont:true) else ( cont:false, FeedBack:StackAddFeedback("","ATInt_error_list"), AnswerNote:"ATInt_error_list"), --- 1221,1230 ---- /* An answer test for integration questions.*/ ! /* sa is the students' ansewer, sbl is a list consisting of (1) the answer, and (2) the variable */ ATInt(sa,sbl) := ! block([old_simp,KEEPFLOAT,RawMark,FeedBack,AnswerNote,str,da,db,dd,dc,sb,var,cont,ta,ex], old_simp:simp, simp:true, RawMark:0, FeedBack:"", AnswerNote:"", /* SBL is a list: the teacher's answer, the variable, and whether formative feedback is to be provided. */ ! if listp(sbl) then (var:sbl[2], sb:sbl[1], cont:true) else ( cont:false, FeedBack:StackAddFeedback("","ATInt_error_list"), AnswerNote:"ATInt_error_list"), *************** *** 1235,1254 **** KEEPFLOAT:true, /* See pg 23 */ if cont then ! (ans : int(sb,var), da:diff(sa,var), db:diff(sb,var), ! ex:trigreduce(trigexpand(trigrat(sa-ans))), dd:float(ex), dc:numberp(dd) and dd#0.0, ! if Stack_Test(da,sb) then if dc then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_const_int"), AnswerNote:"ATInt_const_int") else ! if Stack_Test(sa,ans) then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_const"), AnswerNote:"ATInt_const") else (RawMark:1, AnswerNote:"Correct") else ! if Stack_Test(sa,db) then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_diff"), AnswerNote:"ATInt_diff") else --- 1235,1254 ---- KEEPFLOAT:true, /* See pg 23 */ if cont then ! (ta:sb-coeff(sb,var,0), /* This is to avoid integrating the teacher's answer! */ da:diff(sa,var), db:diff(sb,var), ! ex:trigreduce(trigexpand(trigrat(sa-ta))), dd:float(ex), dc:numberp(dd) and dd#0.0, ! if Stack_Test(da,db) then if dc then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_const_int"), AnswerNote:"ATInt_const_int") else ! if Stack_Test(sa,ta) then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_const"), AnswerNote:"ATInt_const") else (RawMark:1, AnswerNote:"Correct") else ! if Stack_Test(sa,diff(db,var)) then (RawMark:0, FeedBack:StackAddFeedback("","ATInt_diff"), AnswerNote:"ATInt_diff") else *************** *** 1260,1264 **** /* An answer test for differentiation questions.*/ ! /* sa is the students' ansewer, sbl is a list consisting of (1) the integrand, and (2) the variable */ ATDiff(sa,sbl) := block([old_simp,KEEPFLOAT,RawMark,FeedBack,AnswerNote,str,da,db,dd,dc,sb,var,cont], --- 1260,1264 ---- /* An answer test for differentiation questions.*/ ! /* sa is the students' ansewer, sbl is a list consisting of (1) the answer, and (2) the variable */ ATDiff(sa,sbl) := block([old_simp,KEEPFLOAT,RawMark,FeedBack,AnswerNote,str,da,db,dd,dc,sb,var,cont], |