CalculateMath: Final addend, ability to constrain result added

Added the options and code necessary to add a value to the final result, and to constrain the result between upper and lower bounds if desired.

Also completed the fix to issue #422.