Hacker News new | ask | show | jobs
by tpolzer 1154 days ago
If you assume that all three numbers are small integers, doing the division last minimizes precision loss (and doesn't have any loss if the accurate result is representable as a float).

Otherwise you get loss from the division and then multiply that loss (by >1).