--- magix/github/auto-multiple-choice/doc/sty/automultiplechoice.sty	2016-02-13 22:13:34.000000000 +0100
+++ christopher/workspace/OFIN_Exam/automultiplechoice.sty	2016-02-13 22:41:37.000000000 +0100
@@ -1124,6 +1124,8 @@
 \newcount\AMC@numeric@digits
 \newcount\AMC@numeric@decd
 \newcount\AMC@numeric@value
+\newlength{\AMC@numeric@altresult}
+\newcount\AMC@numeric@altvalue
 \newcount\AMC@numeric@x
 \newcount\AMC@numeric@base
 \define@key{AMCNumeric}{Tsign}{\def\AMCntextSign{#1}}
@@ -1146,13 +1148,20 @@
 \define@boolkey{AMCNumeric}{significant}[false]{}
 \define@key{AMCNumeric}{scoreexact}[2]{\def\AMC@numeric@scoreexact{#1}}
 \define@key{AMCNumeric}{scoreapprox}[1]{\def\AMC@numeric@scoreapprox{#1}}
+\define@key{AMCNumeric}{altscoreexact}[0]{\def\AMC@numeric@altscoreexact{#1}}
+\define@key{AMCNumeric}{altscoreapprox}[0]{\def\AMC@numeric@altscoreapprox{#1}}
 \newcount\AMC@numeric@exact
 \newcount\AMC@numeric@approx
+\newcount\AMC@numeric@altexact
+\newcount\AMC@numeric@altapprox
 \define@key{AMCNumeric}{exact}[0]{\AMC@numeric@exact=#1}
 \define@key{AMCNumeric}{approx}[0]{\AMC@numeric@approx=#1}
+\define@key{AMCNumeric}{altresult}[0]{\setlength{\AMC@numeric@altresult}{#1pt}}
+\define@key{AMCNumeric}{altexact}[0]{\AMC@numeric@altexact=#1}
+\define@key{AMCNumeric}{altapprox}[0]{\AMC@numeric@altapprox=#1}
 \setkeys{AMCNumeric}{digits,decimals,base,sign,strict,scoring,vertical,
                      reverse,vhead,scoreexact,scoreapprox,exact,approx,
-                     nozero,significant}
+                     nozero,significant,altresult,altscoreexact,altscoreapprox,altexact,altapprox}
 \newcommand\AMCnumericOpts[1]{\setkeys{AMCNumeric}{#1}}
 \newcommand\AMCnumericShow[4]{%
   \ifAMC@ensemble\def\AMCid@name{#3}\AMCid@quest=#4\fi%
@@ -1163,18 +1172,50 @@
   \ifnum\AMC@numeric@decd>\z@%
     \FPeval\AMC@numeric@eval{round(#1 * \the\AMC@numeric@base^\the\AMC@numeric@decd,0)}
     \AMC@numeric@value=\AMC@numeric@eval%
+    \ifnum\AMC@numeric@altresult>\z@%
+      \FPeval\AMC@numeric@eval{round(\strip@pt\AMC@numeric@altresult * \the\AMC@numeric@base^\the\AMC@numeric@decd,0)}%
+      \AMC@numeric@altvalue=\AMC@numeric@eval%
+    \fi%
   \else%
     \ifKV@AMCNumeric@significant%
       \AMCsignificantDigits[\the\AMC@numeric@base]{\AMC@numeric@digits}{#1}{\AMC@numeric@value}%
+      \ifnum\AMC@numeric@altresult>\z@%
+		\AMCsignificantDigits[\the\AMC@numeric@base]{\AMC@numeric@digits}{\AMC@numeric@altresult}{\strip@pt\AMC@numeric@altvalue}%
+      \fi%
     \else%
       \AMC@numeric@value=#1%
+      \ifnum\AMC@numeric@altresult>\z@%
+		\AMC@numeric@altvalue=\strip@pt\AMC@numeric@altresult%
+      \fi%
+    \fi%
+  \fi%
+  \ifnum\AMC@numeric@altvalue>\z@%
+  	\ifdim\AMC@numeric@altscoreexact pt>\z@%
+  	  \ifnum\AMC@numeric@altexact=\z@%
+  		\AMC@numeric@altexact=\AMC@numeric@exact%
+  	  \fi%
+  	\fi%
+  	\ifdim\AMC@numeric@altscoreapprox pt>\z@%
+	  \ifnum\AMC@numeric@altapprox=\z@%
+  		\AMC@numeric@altapprox=\AMC@numeric@approx%
+	  \fi%
     \fi%
   \fi%
   \ifKV@AMCNumeric@scoring%
     \AMC@amclog{AUTOQCM[B=formula=(Vdifference<=\the\AMC@numeric@exact?%
       \AMC@numeric@scoreexact:%
       \ifnum\AMC@numeric@approx>\z@%
-        (Vdifference<=\the\AMC@numeric@approx?\AMC@numeric@scoreapprox:0)%
+      (Vdifference<=\the\AMC@numeric@approx?\AMC@numeric@scoreapprox:%
+      \ifnum\AMC@numeric@altvalue>\z@%
+  		(Vdifference2<=\the\AMC@numeric@altexact?\AMC@numeric@altscoreexact:%
+	  	\ifnum\AMC@numeric@altapprox>\z@%
+    	  (Vdifference2<=\the\AMC@numeric@altapprox?\AMC@numeric@altscoreapprox:0)%
+	  	\else%
+	      0%
+  		\fi)%
+  	  \else%
+  	  	0%
+      \fi)%
       \else%
         0%
       \fi)]^^J}%
@@ -1200,11 +1241,22 @@
     \global\edef\AMC@numeric@compute{(\AMC@numeric@compute)*(intS)}%
   \fi%
   \AMC@amclog{AUTOQCM[B=set.intV=\the\AMC@numeric@value,%
+    \ifnum\AMC@numeric@altvalue>\z@%
+      set.intV2=\the\AMC@numeric@altvalue,%
+    \fi%
     set.intX=\AMC@numeric@compute]^^J}%
   \ifKV@AMCNumeric@significant%
-    \AMC@amclog{AUTOQCM[B=set.Vdifference="min( abs((intV)-(intX)) , abs(10*(intV)-(intX)) , abs((intV)-10*(intX)) )"]^^J}%
+    \AMC@amclog{AUTOQCM[B=set.Vdifference="min( abs((intV)-(intX)) , abs(10*(intV)-(intX)) , abs((intV)-10*(intX)) )"%
+    \ifnum\AMC@numeric@altvalue>\z@%
+      ,set.Vdifference2="min( abs((intV2)-(intX)) , abs(10*(intV2)-(intX)) , abs((intV2)-10*(intX)) )"%
+    \fi%
+    ]^^J}%
   \else%
-    \AMC@amclog{AUTOQCM[B=set.Vdifference=abs((intV)-(intX))]^^J}%
+    \AMC@amclog{AUTOQCM[B=set.Vdifference=abs((intV)-(intX))%
+    \ifnum\AMC@numeric@altvalue>\z@%
+      ,set.Vdifference2=abs((intV2)-(intX))%
+    \fi%
+    ]^^J}%
   \fi%
   \vspace{1.5ex}\par{%
     \fboxrule=\AMCncol@BorderWidth%
