#NEWLINE# def python_mpf_mul_int( s , n , prec , rnd = round_fast ) : #NEWLINE# #INDENT# 'Multiply by a Python integer.' #NEWLINE# ( sign , man , exp , bc ) = s #NEWLINE# if ( not man ) : #NEWLINE# #INDENT# return mpf_mul ( s , from_int ( n ) , prec , rnd ) #NEWLINE# #UNINDENT# if ( not n ) : #NEWLINE# #INDENT# return fzero #NEWLINE# #UNINDENT# if ( n < 0 ) : #NEWLINE# #INDENT# sign ^= 1 #NEWLINE# n = ( - n ) #NEWLINE# #UNINDENT# man *= n #NEWLINE# if ( n < 1024 ) : #NEWLINE# #INDENT# bc += ( bctable [ int ( n ) ] - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bc += ( bitcount ( n ) - 1 ) #NEWLINE# #UNINDENT# bc += int ( ( man >> bc ) ) #NEWLINE# return normalize ( sign , man , exp , bc , prec , man )