def fastlog(x):
 if ((not x) or (x == fzero)):
  return MINUS_INF
 return (x[2] + x[3])

def fastlog ( x ) : if ( ( not x ) or ( x == fzero ) ) : return MINUS_INF return ( x [ 2 ] + x [ 3 ] )
fast approximation of log2(x) for an mpf value tuple x .