I have an exercise with several answers. Most of the answers are of the order 10^(-13) or smaller, one is of the order 10^14. For the small answers, WeBWorK shows 0 for the answer and gives credit for 0, but not for a value of the proper order but not within the relative tolerance specified.

That is, when the specified answer is 6.5346*10^(-13), WeBWorK marks 0 as correct but marks 5.5346*10^(-13) as wrong. WeBWorK also marks the student input of 6.5346*10^(-13) as correct, but shows 0 as the entered value (with nicely formatted scientific notation for the Answer preview).

I have been unable to use Context("ScientificNotation"), even after loading "contextScientificNotation.pl"--I get various error messages such as “'pi' is not defined in this context”, but the exercise includes computation of the volume of a small sphere, so I need pi.

I’d certainly like WeBWorK not to show 0 for a value that is intentionally small but positive. But I’m really perturbed that WeBWorK gives credit for an answer of 0 but rejects an answer that is actually closer to the correct value.

The code includes

$f = Formula("k (A)^(1/3)");

#Context("ScientificNotation");

$k = 1.3 *10**(-13);

$r_iodine = $f->eval(k=>$k, A=>127);

$V_iodine = (4*pi*($r_iodine)**3)/3;

$m_iodine = 2.1*10**(-22);

$d_iodine = ($m_iodine)/($V_iodine);

####other stuff including BEGIN_PGML#######

a.

Estimate the radius of the nucleus of an atom of iodine-127, which has mass number 127. If the nucleus is roughly spherical, what is its volume?

Radius [` \approx `][_____________]{$r_iodine->with(tolType => 'relative', tolerance => .05, );} cm, volume [` \approx `][_____________]{$V_iodine->with(tolType => 'relative', tolerance => .05, );} [`\text{cm}^3`].

b.

The nuclear mass of iodine-127 is [`2.1 \times 10^{-22} `] gram. What is the density of the nucleus? (Density is mass per unit volume.)

Density [` \approx `][_____________]{$d_iodine->with(tolType => 'relative', tolerance => .05, );} [`\text{gm/cm}^3`].