## WeBWorK Problems

### Evaluating a Formula at an undefined value

by Paul Seeburger -
Number of replies: 2
I have figured out how to use test_at to add values where the correct answer is defined but the student answer may not be defined.

For example when the correct answer is ln |x| and the student enters: ln x.

But what if the situation is the other way around?

What if the correct answer is ln x and the student enters: ln |x|?  When I try to add negative values to test_at, I get the error:  Can't evaluate formula on test point (-1)

Yet when I don't check at negative values, the student is given full credit for the ln |x|, even though it is NOT equivalent to the correct function.  It just happens to be equivalent on the domain of the correct answer.

The same issue comes up with sqrt(x) and sqrt|x| for example.

Can anyone point me to the way to help the checker to discriminate correctly in these cases?

Thanks!

Paul

### Re: Evaluating a Formula at an undefined value

by Davide Cervone -
You need to set the formula's checkUndefinedPoints property to true in order for MathObjects to allow checking at undefined points. See the table of Formula Properties for details.