Phillip Ezolt ezolt@perf.zko.dec.com writes:
It converts the intermediate variables to floats instead of int, which guarantees that multiplication of large values of don't overflow. (with a small sacrifice of accuracy)
You should probably use MulDiv() instead of floats.