def add_logs(logx, logy):
 if (logx < (logy + _ADD_LOGS_MAX_DIFF)):
  return logy
 if (logy < (logx + _ADD_LOGS_MAX_DIFF)):
  return logx
 base = min(logx, logy)
 return (base + math.log(((2 ** (logx - base)) + (2 ** (logy - base))), 2))

def add_logs ( logx , logy ) : if ( logx < ( logy + _ADD_LOGS_MAX_DIFF ) ) : return logy if ( logy < ( logx + _ADD_LOGS_MAX_DIFF ) ) : return logx base = min ( logx , logy ) return ( base + math . log ( ( ( 2 ** ( logx - base ) ) + ( 2 ** ( logy - base ) ) ) , 2 ) )
given two numbers logx = *log(x)* and logy = *log(y)* .