[LON-CAPA-users] Puzzling situation...
Mills, Douglas G
dmills at illinois.edu
Mon Feb 25 20:58:17 EST 2013
Thank you Stuart!
Doug
-sent from mobile-
On Feb 25, 2013, at 5:40 PM, "Stuart Raeburn" <raeburn at msu.edu> wrote:
> Hi,
>
>> Thank you. Would that then explain the following bomb message:
>>
>> Sun Feb 24 06:15:32 pm 2013 (CST): Computer's answer is incorrect
>> ("0.00"). It is likely that the tolerance range [5.488e-17, 5.712e-17] or
>> significant figures [1, 2] need to be adjusted.
>
> Yes.
>
> This is the same thing as the student saw. A submitted value of 0.00 was compared with the acceptable range: 5.488e-17 - 5.712e-17 and found to lie outside the range, and so INCORRECT was the award. Machine precision meant that in this case the computation of $dY11 resulted in a value of 5.6e-17, and with a 2% relative tolerance this gave the range of acceptable values for the answer of 5.488e-17 to 5.712e-17.
>
> One way to solve this issue would be to compute $dY11, and then test in the script block if it would be zero, allowing for machine precision. If that is the case, $dY11 would be explicitly set to 0
>
> $dY11=$EAY11-$AY11;
> if (abs($dY11) < 1.0E-16) {
> $dY11 = 0;
> }
> $dY11=&format($dY11,"2s");
>
> The particular bomb message you saw would have originated when the "Computer's answer" of 0.00 was compared with the computed value of $dY11 which in this case was 5.6e-17. That comparison occurs:
>
> (a) post-answer date, when the computer's answer is shown
>
> or
>
> (b) when a student's submissions are being viewed.
>
>
> Before "testing" the answer, LON-CAPA converts the "Computer's answer",
> as generated in the script block, to the format specified for the answer
> (i.e., whatever is defined in the format attribute in the
> numericalresponse tag) -- in this case 2f.
>
> For a numericalresponse items, if the "grade" returned is not "correct",
> and significant figures have been defined then the error message:
>
> "It is likely that the tolerance range or significant figures need to be
> adjusted." is set.
>
>
> Stuart Raeburn
> LON-CAPA Academic Consortium
>
>
> Quoting "Mills, Douglas G" <dmills at illinois.edu>:
>
>> Hi Stuart,
>>
>> Thank you. Would that then explain the following bomb message:
>>
>> Sun Feb 24 06:15:32 pm 2013 (CST): Computer's answer is incorrect
>> ("0.00"). It is likely that the tolerance range [5.488e-17, 5.712e-17] or
>> significant figures [1, 2] need to be adjusted.
>> This error occurred while processing response 25 in part 320
>> The error occurred on host uiucaccess2
>> This error occurred on machine uiucaccess2
>>
>> And if so, how should we be accomplishing what we are trying to do?
>> Thanks!
>>
>>
>> Doug
>>
>> Douglas Mills
>> Director of Instructional Technologies
>> Department of Chemistry
>> University of Illinois
>> dmills at illinois.edu
>> (217) 244-5739
>>
>>
>>
>>
>>
>>
>>
>> On 2/22/13 1:23 PM, "Stuart Raeburn" <raeburn at msu.edu> wrote:
>>
>>> Hi,
>>>
>>>> Any ideas anyone on why in the second instance ($db12, id=25) 0 is
>>>> accepted as a correct answer but in the other instance ($dy11,
>>>> id=22), 0 is returned as incorrect???
>>>
>>> Perhaps you are seeing an artifact of floating point calculations in
>>> the situation where the answer is zero, and you are using a relative
>>> tolerance?
>>>
>>> Stuart Raeburn
>>> LON-CAPA Academic Consortium
>>>
>>>
>>> Quoting "Mills, Douglas G" <dmills at illinois.edu>:
>>>
>>>> HI All,
>>>>
>>>> We're greatly perplexed by this situation. We have a student whose
>>>> results for two different responses in a part should be 0, but the
>>>> answer is accepted for one of the responses and not accepted for the
>>>> other. To the best of my abilities to discern, everything about the
>>>> two items is identical (and having written these, it's almost
>>>> certain that I cut and pasted my way from one to the other) and the
>>>> data for the two are analogous.
>>>>
>>>> The formulas for computing the two answers are:
>>>>
>>>> $dY11=&format($EAY11-$AY11,"2s");
>>>> $dB12=&format($EAB12-$AB12,"2s");
>>>>
>>>> The values for the variables in her instance are:
>>>>
>>>> $EAY11=4.2e-1
>>>>
>>>> $AY11=.42
>>>>
>>>> $EAB12=2.6e-1
>>>>
>>>> $AB12=.26
>>>>
>>>> The coding in the problems looks (is!?) identical as well:
>>>>
>>>> <numericalresponse format="2f" answer="$dY11" id="22">
>>>> <responseparam name="tol" type="tolerance" default="2%"
>>>> description="Numerical Tolerance" />
>>>> <responseparam name="sig" type="int_range" default="1,2"
>>>> description="Significant Digits" />
>>>> <textline /> $PART20msg[1]
>>>> </numericalresponse>
>>>>
>>>> <numericalresponse format="2f" answer="$dB12" id="25">
>>>> <responseparam name="tol" type="tolerance" default="2%"
>>>> description="Numerical Tolerance" />
>>>> <responseparam name="sig" type="int_range" default="1,2"
>>>> description="Significant Digits" />
>>>> <textline /> $PART20msg[4]
>>>> </numericalresponse>
>>>>
>>>> Any ideas anyone on why in the second instance ($db12, id=25) 0 is
>>>> accepted as a correct answer but in the other instance ($dy11,
>>>> id=22), 0 is returned as incorrect???
>>>>
>>>> Doug
>>>>
>>>> Douglas Mills
>>>> Director of Instructional Technologies
>>>> Department of Chemistry
>>>> University of Illinois
>>>> dmills at illinois.edu<mailto:dmills at illinois.edu>
>>>> (217) 244-5739
>
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
More information about the LON-CAPA-users
mailing list