c1 = 25.4 c2 = 1/c1 maxerr = 0 for i in range(-100000, 100000): j = i * .0001 k = j * c1 * c2 err = abs(j-k) maxerr = max(err, maxerr) print maxerr