WeBWorK Problems

Issue with too-short intervals

by Alex Jordan -
Number of replies: 0
In the following, an interval [5.099, 5.101] is defined. The endpoints are so close, that default tolerances make WW treat them as equal. So I understand why the interval ends up printing as a single value, [5.099].

However nothing seems to be acceptable to enter this into the answer blank. Entering [5.099] gives the message:
(it looks like a real number)

And entering [5.099, 5.101] gives the message:
The parentheses for your set are of the wrong type

What's going on here?

For now I will advise the author to tighten the tolerance, and I think all will be well. But I wanted to post in case this identifies a bug.

DOCUMENT();

"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
);

##############################################
TEXT(beginproblem());

$a = 5.1;$b = 0.001;

Context("Interval");
$c =$a-$b;$d = $a+$b;
$ans = Compute("[$c,$d]"); ############################################## BEGIN_PGML Enter [[$ans]].

[_______________]{\$ans}

END_PGML
##############################################

ENDDOCUMENT();