[Aimmath-commit] AIM/WEB-INF/maple/aim Test.mpl,1.5,1.6
Brought to you by:
gustav_delius,
npstrick
|
From: <mo...@us...> - 2003-09-19 20:13:23
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv7298
Modified Files:
Test.mpl
Log Message:
tweak to allow extended_numeric values infinity,-infinity, undefined as student and teacher's answers
Index: Test.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Test.mpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Test.mpl 19 Sep 2003 04:11:15 -0000 1.5
--- Test.mpl 19 Sep 2003 20:13:19 -0000 1.6
***************
*** 112,115 ****
--- 112,138 ----
):
+ ######################################################################
+
+ `Package/Assign`(
+ `aim/TestExtended_numeric`::boolean,
+ "Returns @`aim/TestNumeric`(ans,rightans)@ if @ans@ and @rightans@ are both @numeric@, otherwise it returns @`aim/TestEqual`(ans,rightans)@. This allows the @ans@ and @rightans@ to be one of @{infinity,-infinity,undefined}@
+ ",
+ proc(ans::anything,
+ rightans::anything,
+ # optional
+ marginspec_::`aim/Test/MarginSpecification`)
+ local marginspec;
+
+ marginspec:=NULL;
+ if nargs>2 then marginspec:=marginespec_ fi;
+
+ if type(ans,numeric) and type(rightans,numeric) then
+ return `aim/TestNumeric`(ans,rightans,marginspec)
+ else
+ return `aim/TestEqual`(ans,rightans)
+ fi:
+ end
+ ):
+
# END KM
***************
*** 453,456 ****
--- 476,483 ----
if mapletype = numeric or type([rightans],[numeric]) then
RETURN(`aim/TestNumeric`(ans,rightans,marginspec));
+ # KM
+ elif mapletype = extended_numeric or type([rightans],[extended_numeric]) then
+ return `aim/TestExtended_numeric`(ans,rightans,marginspec)
+ # END KM
elif mapletype = string or type([rightans],[string]) then
RETURN(`aim/TestEqual`(ans,rightans));
|