Given:
unsigned int a, b, c, d;
I want:
d = a * b / c;
and (a *b ) may overflow; also (b/c) may equal zero and give less accuracy.
Maybe a cast to 64-bits would get things to work, but I want to know the best way to get the most accurate result in d.
Is there any good solution?