Add float typecasting to prevent the loss of fractional part in division