The WIRIS quizzes system is based in WIRIS cas, which can do calculations both numeric and symbolic. When working numeric you may want to control the amount of digits of the numbers.
You can set the number of significant digits using the
But please remember this setting only applies to the output of values; i.e. the correct answer shown, and the variables in the wording and feedbacks.
Short answer questions the student inputs an
Answer that is compared with the
Correct answer. This comparison is not affected by the
Precision setting; that only affects outputs. You can set the number of digits for the comparison using the
Tolerance setting. Informally the
Tolerance sets the number of decimals that must match between the
Answer and the
Correct answer. If the
Tolerance is set
Relative then means significant digits; otherwise is
Absolute and means plain decimal places.
Precision is for output and
Tolerance is for input, and they are independent.
Here are more precise remarks:
Toleranceare settings directly related to the WIRIS cas commands
relative_tolerance(). You can take a look at the WIRIS cas manual.
Tolerance digits4 translates to
tolerance(10^-4). The bigger the
Tolerance digitssetting is, the smaller the actual tolerance is.
In WIRIS quizzes, by default
Precisionis set to 4, and
Toleranceis also 4 and
Precisioncan be an integer in the range 1..15.
Tolerancecan be any number, including negatives. If
Relative, it should be less or equal than
Precision, and in any case should be less than 15 to avoid trouble.
No matter the
Precision, internally the values are calculated with around 15 significant digits, what is called double precision according to the IEEE 754 standard. No matter these internal digits, answers are compared according to
Toleranceis not strict, even when
Absolute. For example, with tolerance absolute 1 you can not trust 0.09 is 0 and 0.11 is not. The actual tolerance is not exactly the number in the setting, but usually a little bigger.
It is not fully true that
Toleranceare the digits that must match between the
Correct answer. As a counter example, consider
Correct answerof 4. and
Answerof 3.9999999998765, that have all digits different. As a corollary; don't use
Toleranceto make questions about rounding!
If you want to make questions about rounding, and so the
Correct answeris unique, use the Validation
has less or equal digits/decimals than ..., and set
Toleranceto 15. Or also use
If you work without decimal numbers, neither the
Toleranceapplies, because the system will work symbolic and the comparisons will be exact. But if the student answers a decimal number, then
Tolerancedo applies. Also decimal numbers can be the result of some operations, like
numeric_solve(). Furthermore some of operations produce sometimes exact numbers and sometimes decimal numbers, like
argument(). So the conclusions is: be prepared to get sometimes unexpected decimal numbers.
- You can convert the integer a into decimal just doing a·1. or a+0. for example. So if you want always decimal numbers, just do this operation near the end.
Also be prepared to get the output in scientific notation, when the value can not be shown in fixed-point notation in less digits than