...shifts, additions and substractions), and if non-integers, multiply by the reciprocal of the divisor (i.e. instead of v = x / y, do z = 1/y, v = x * z). There are plenty of math tricks around - search the web.
The C compiler has an "early out" mechanism, so if you have, for instance if (foo()...