WeBWorK Main Forum

tolerance different if Numeric is/is not declared

tolerance different if Numeric is/is not declared

by Alex Jordan -
Number of replies: 0
I always assumed that if a problem used MathObjects and did not declare a context, that Numeric was loaded anyway by default.

Lately, we noticed that some problems were demanding more decimal precision than others, and this seemed to be a new phenomenon. I traced it down to those that explicitly loaded a context versus those that did not. In years of using WeBWorK, we have never observed a difference, so I am wondering if something has unintentionally changed.

Immediately following the loadMacros call, including loading PGinfo.pl, these lines of code:


demonstrate that the tolerance flag changes from 0.0001 to 0.001. (The latter is what we are used to experiencing.) If you find that the tolerances are the same for you, and you are on 2.12, please let me know.

The other difference is that before Numeric is explicitly loaded, the useBaseTenLog flag is not initialized. But after, it is set to 1.

Any insight as to what is going on here? Did behavior change with 2.12? And should it be the case that not loading a context is equivalent to loading Numeric?