def roundup(number, ndigits=0, return_type=None):
 sign = (1 if (number >= 0) else (-1))
 precision = (10 ** ((-1) * ndigits))
 if (not return_type):
  return_type = (float if (ndigits > 0) else int)
 (quotient, remainder) = divmod(abs(number), precision)
 if ((not (IRONPYTHON and (((quotient * precision) + remainder) > abs(number)))) and (remainder >= (precision / 2))):
  quotient += 1
 return (sign * return_type((quotient * precision)))

def roundup ( number , ndigits = 0 , return_type = None ) : sign = ( 1 if ( number >= 0 ) else ( - 1 ) ) precision = ( 10 ** ( ( - 1 ) * ndigits ) ) if ( not return_type ) : return_type = ( float if ( ndigits > 0 ) else int ) ( quotient , remainder ) = divmod ( abs ( number ) , precision ) if ( ( not ( IRONPYTHON and ( ( ( quotient * precision ) + remainder ) > abs ( number ) ) ) ) and ( remainder >= ( precision / 2 ) ) ) : quotient += 1 return ( sign * return_type ( ( quotient * precision ) ) )
rounds number to the given number of digits .