Is there is a simple, pythonic way of rounding to the nearest whole number without using floating point? I\'d like to do the following but with integer arithmetic:
This should work too:
def rint(n): return (int(n+.5) if n > 0 else int(n-.5))