• + 1 comment

    Well, for one, integer division is much faster.

    Also, here is an example of an effect of the loss of precision for floats (Python):

    7.0/3.0 - 4.0/3.0 - 1.0 -> 2.220446049250313e-16

    7.0/3.0 - 4.0/3.0 - 1.0 == 0 -> False

    (10.0/3.0) / (4.0/3.0) -> 2.5000000000000004

    (10.0*3.0)/(4.0*3.0) -> 2.5

    The two last ones should show you what the loss of precision can do. It is the same exact equation, but with two slightly different results (albeit equal up to the 15th decimal).