#NEWLINE# def python_mpf_mul( s , t , prec = 0 , rnd = round_fast ) : #NEWLINE# #INDENT# 'Multiply two raw mpfs' #NEWLINE# ( ssign , sman , sexp , sbc ) = s #NEWLINE# ( tsign , tman , texp , tbc ) = t #NEWLINE# sign = ( ssign ^ tsign ) #NEWLINE# man = ( sman * tman ) #NEWLINE# if man : #NEWLINE# #INDENT# bc = ( ( sbc + tbc ) - 1 ) #NEWLINE# bc += int ( ( man >> bc ) ) #NEWLINE# if prec : #NEWLINE# #INDENT# return normalize1 ( sign , man , ( sexp + texp ) , bc , prec , rnd ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( sign , man , ( sexp + texp ) , bc ) #NEWLINE# #UNINDENT# #UNINDENT# s_special = ( ( not sman ) and sexp ) #NEWLINE# t_special = ( ( not tman ) and texp ) #NEWLINE# if ( ( not s_special ) and ( not t_special ) ) : #NEWLINE# #INDENT# return fzero #NEWLINE# #UNINDENT# if ( fnan in ( s , t ) ) : #NEWLINE# #INDENT# return fnan #NEWLINE# #UNINDENT# if ( ( not tman ) and texp ) : #NEWLINE# #INDENT# ( s , t ) = ( t , s ) #NEWLINE# #UNINDENT# if ( t == fzero ) : #NEWLINE# #INDENT# return fnan #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 1 : finf , #NEWLINE# ( - 1 ) : fninf , #NEWLINE# #UNINDENT# } [ ( mpf_sign ( s ) * mpf_sign ( t ) ) ]