Hi Alberto,
I don't have a solution to this, but I've seen behavior that I think is
the same as that which you've described. In my case it's always
occurred when I'm doing some calculations on a solution before handing
it off to a WeBWorK answer evaluator, and those calculations result in
a very small number.
For example, I'll do something like calculate
$qu = $a/$b;
where $a is something like 1 and $b is something like 30,000, so that $qu evaluates in Perl to be 3.333e-05 . Then when I hand this off to an answer evaluator, viz.,
ANS( num_cmp($qu) );
I run into trouble with num_cmp not correctly intepreting what the e-05 means.
I haven't found a solution to this other than avoiding very small
numbers, and/or putting a conditional in the text of the problem to
detect this case and deal with it appropriately.
Gavin
<| Post or View Comments |>
|