I'm writing some code on an Arduino that needs to run fast and make rough approximations to percentages of integers.
For example, given a number I want to find 90% of it, or 70% or 30% etc. The obvious way to do it is multiply by a floating point eg. x * 0.9; or x * 0.3; But because I need speed, I want to avoid a floating point calculation. If I was just dividing by a power of two, I'd do a bitwise shift, but are there similar techniques for approximating 90%, 80% etc. using integers?