Changed calculation to float to get proper rounding