Calculated questions

Calculated questions offers a way to create individual numerical question by the use of wildcards that are substituted with individual values when the quiz is taken.
Below is a shrunken view of the main editing page with some example inputs:

Question:
Image to display:
Correct Answer Formula:   
Tolerance: ±
Tolerance Type:
Significant Figures:

In the question text input and "Correct Answer Formula" {a} and {b} can be seen. These and any other {name} can be used as a wildcard that is substituted by some value when the quiz is taken. Also, the correct answer is calculated when the quiz is submitted using the expression in "Correct Answer Formula", which is calculated as a numerical expression after the substitution of the wildcards. The possible wildcard values are set or generated on a later page in "editing wizard" for calculated questions...

The example formula uses the operator +. Other accepted operators are -*/ and % where % is the modulo operator. It is also possible to use some PHP-style mathematical function. Among these there are 24 single-argument function:
abs, acos, acosh, asin, asinh, atan, atanh, ceil, cos, cosh, deg2rad, exp, expm1, floor, log, log10, log1p, rad2deg, round, sin, sinh, sqrt, tan, tanh
and two two-argument functions
atan2, pow
and the functions min and max that can take two or more arguments. It is also possible to use the function pi that takes no arguments but do not forget the use the parentheses - the correct usage is pi(). Similarly the other function must have their argument(s) within parentheses. Possible usage is for example sin({a}) + cos({b}) * 2. It should not be any problem to wrap functions within each other like cos(deg2rad({a} + 90)) etc.
More details on how to use these PHP-style functions can be found in the documentation at the PHP web site

As for numerical questions it is possible to allow a margin within which all responses are accepted as correct. The "Tolerance" field is used for this. However, there are three different types of tolerances. These are Relative, Nominal and Geometric. If we say that the correct answer at quiz time is calculated to 200 and the tolerance is set to 0.5 then the different tolerance types work like this:

Relative: A toler