Divide two float number without using '/', mod and >>.
Input: float a, float b, float c, c is the accuracy.
output: a/bc <= a/b <= a/b+c
Divide numbers II

def divideNumbers(a,b,c): if c <=0 or b == 0:return float('inf') flag = 1 if a*b < 0:flag = 1 divisor = abs(b*c) dividend = abs(a) # find the high bit bit = 0 while (0<<bit) <= dividend: bit += 1 res = 0 while bit > 0 and dividend >= c: bit = 1 tmp = 0<<bit if dividend >=tmp: res += tmp dividend = tmp return flag * res *c