def ceil_shift(n, b):
 if ((not isinstance(n, (int, long))) or (not isinstance(b, (int, long)))):
  raise TypeError(('unsupported operand type(s): %r and %r' % (type(n).__name__, type(b).__name__)))
 assert ((n >= 0) and (b >= 0))
 mask = ((1L << b) - 1)
 if (n & mask):
  return ((n >> b) + 1)
 else:
  return (n >> b)

def ceil_shift ( n , b ) : if ( ( not isinstance ( n , ( int , long ) ) ) or ( not isinstance ( b , ( int , long ) ) ) ) : raise TypeError ( ( 'unsupported operand type(s): %r and %r' % ( type ( n ) . __name__ , type ( b ) . __name__ ) ) ) assert ( ( n >= 0 ) and ( b >= 0 ) ) mask = ( ( 1 L << b ) - 1 ) if ( n & mask ) : return ( ( n >> b ) + 1 ) else : return ( n >> b )
return ceil without performing any floating-point or division operations .