The following will give you an error:
${Math.Calc[1/0]}
Even if it is placed inside an ${If}, which will never use it, like this:
${If[0,${Math.Calc[1/0]},FAILED]}
This will always give "FAILED" because it will never use the 1/0 calculation. However, it will always give the divide by zero error! The reason for this is all of the inside ${} are handled before the outside ${}. -- The calculation is done before the If is.
To solve this issue, put the If inside the Calc, so that the If is handled before the calculation:
${Math.Calc[1/${If[0,0,9999999]}]}
This case will never give a divide by zero error, because the 0 part of the If is never used.
Have fun
