Add float casts to prevent loss of precision in int/int division.