User Tools

Site Tools


dealing_with_some_common_errors

Dealing with some Common Errors

Can't generate enough valid points for comparison

Webwork compares functions by plugging in some points and seeing if they match. This error means that Webwork failed when trying to compare the student's function/equation to the correct function/equation. This occurs when the numbers it tries to plug in to the correct function and the student's function are not in the domain of one or both functions. It can also occur due to computational limitations:

  • The calculation involved numbers that were too big.
  • The calculation involved non-integer powers of negative numbers.
  • The calculation involved imaginary numbers.

To fix this, you can explicitly tell Webwork which points to plug in to the functions. Replace, e.g.,

fun_cmp("[correct answer]")

by

fun_cmp("[correct answer]", limits => [a,b] )

where [a,b] is the interval from which Webwork should pick test points, or by

fun_cmp("[correct answer]", test_points=>[a,b,c,d,e] )

where a, b, c, d, and e are the specific points which Webwork should test. See http://webwork.maa.org/wiki/FormulaTestPoints for more details.

dealing_with_some_common_errors.txt · Last modified: 2010/01/11 14:32 (external edit)