Fixed a bug in the calculator

Fixed a bug in the calculator where decimal places were being stripped
during calculation.