Forum archive 2000-2006

Thomas Hagedorn - Error in Answer Evaluator?

Thomas Hagedorn - Error in Answer Evaluator?

by Arnold Pizer -
Number of replies: 0
inactiveTopicError in Answer Evaluator? topic started 9/22/2003; 11:19:58 PM
last post 9/23/2003; 12:17:32 PM
userThomas Hagedorn - Error in Answer Evaluator?  blueArrow
9/22/2003; 11:19:58 PM (reads: 848, responses: 3)

We're having a problem with Calc problem

setDerivatives5ChainRule/ur_dr_5_21.pg

The answer is a long expression involving e.  When you type in the correct
answer, you get an error message that Webwork is unable to parse the expression and
that the submitted answer is incorrect. When you select "Preview Answers",
the correct answer is displayed, although some of it
is cut off at the right side.  Now the answer displayed when
"Show Answers" is clicked is identical to what is typed in, except that the
numerical value for e is substituted for e.  

We're running Webwork 1.9.  I know others have reported an error with Webwork 1.9 involving an answer evaluator but those errors seem of a different nature.   Is this covered by that patch?  [We've been hesitant to update files on a file by file basis since the system is
running  very well  right now].

Thanks,
Tom

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Error in Answer Evaluator?  blueArrow
9/23/2003; 7:54:06 AM (reads: 1046, responses: 0)

Tom,

WeBWorK's function_cmp answer evaluator checks correctness of answers by doing numerical comparisons after plugging in random numbers for the variable. By default, the random numbers are chosen in the open interval (0,1).  In this problem, this results in WeBWorK attempting to evaluate square roots of negative numbers.  So in short, to fix this you need to add extra parameters to the function_cmp() answer evaluator to pick a more appropriate interval.

Zig

 

<| Post or View Comments |>


userThomas Hagedorn - Re: Error in Answer Evaluator?  blueArrow
9/23/2003; 10:34:41 AM (reads: 1048, responses: 0)

Thanks Zig!

I don't know how the evaluator is coded, but maybe another way around this problem
would be to have the program realize that certain perl errors (like square roots of
negative numbers) shouldn't be regarded as fatal errors coming from an incorrect
expression.   That way, the answer is only incorrect if
both sides of the expression can be evaluated without errors and the sides differ.

-Tom


<| Post or View Comments |>


userJohn Jones - Re: Error in Answer Evaluator?  blueArrow
9/23/2003; 12:17:32 PM (reads: 1044, responses: 0)
Hi,

What you suggest would be nice, but really the instructor's answer should be good. Otherwise WW will have to hunt for its domain, so I think it is reasonable to expect problem writers to provide a valid domain if there is a risk that the default will not work.

On the other hand, I don't think WW should say "Error" to a student when it cannot evaluate the student answer at a sample value. For example, if the answer is sqrt(1-x) and a student enters sqrt(x-1), WW replies

error: Can't take sqrt of -0.742.
Error detected evaluating student input at (0.2580000484 )
We already have students thinking that WW can't handle the way they enter their answers. In this example, the answer may be wrong but it is syntactically ok, so students are mislead by the message. I think that the error should be considered internal to WW and the student should just be told that the answer is incorrect.

Has this been changed in 1.9 or 2.0?

John

<| Post or View Comments |>