## WeBWorK Main Forum

### fun_cmp evaluation points ### fun_cmp evaluation points

by Arnold Pizer -
Number of replies: 2
Here is a question emailed to us by Daniel A. Graham from Duke.

1. When both absolute and relative tolerance are specified as they are, I believe, by default, must a correct answer satisfy both or either?

2. When the default number of points is in effect for fun_cmp, 3 I think, and there are two variables, say x and y, I understand that 3 values for x are selected, call them x1, x2 and x3, and 3 values for y, call them y1, y2 and y3. Are the correct and student answers compared at the three points (x1, y1), (x2, y2) and (x3, y3) or at the nine points (x1, y1), (x1, y2), (x1, y3), ..., (x3, y3)? ### Re: fun_cmp evaluation points

by Arnold Pizer -
> 1. When both absolute and relative tolerance are specified as they are, I believe, by default, must a correct answer satisfy both or either?

It's either one or the other (not both) and relative tolerance is the default.

> 2. When the default number of points is in effect for fun_cmp, 3 I think, and there are two variables, say x and y, I understand that 3 values for x are selected, call them x1, x2 and x3, and 3 values for y, call them y1, y2 and y3. Are the correct and student answers compared at the three points (x1, y1), (x2, y2) and (x3, y3) or at the nine points (x1, y1), (x1, y2), (x1, y3), ..., (x3, y3)?

I didn't know the answer to this so I checked by using the very useful
diagnostics tag introduced by Davide Cervone. The answer is (x1, y1),
(x2, y2) and (x3, y3) which you can find as follows:

ANS(fun_cmp("xy", var=>2, diagnostics=>1));
and then submitting an answer gives:

Only formulas with one variable can be graphed at

Diagnostics for x*y:

(x,y): (0.4170000166,0.564999987) (0.6859999628,0.5569999886) (0.8059999388,0.9619999076)

Absolute Error: 0 0 0
Relative Error: 0 0 0

Arnie 