What are the best techniques to avoid using fp math when programming for AVR?
I usually multiply the operands by 10, operate with them on that higher order, then in the end add 5 and divide by 10 to truncate the result to the approximation. As an example, 10/6=1.(6). If I just use the result I get 1, but if I do (10*10/6+5)/10 I get 2 which is a more approximate result. However, this seems highly ineffective to me, and I wonder it here's an easier way. I read in this forum that I could multiply by powers of 2 and then the division operations would be simples bit shifts, but didn't quite understand how that would work. If anyone could elaborate I'd appreciate it.