def _compute_delta(log_moments, eps):
 min_delta = 1.0
 for (moment_order, log_moment) in log_moments:
  if (moment_order == 0):
   continue
  if (math.isinf(log_moment) or math.isnan(log_moment)):
   sys.stderr.write(('The %d-th order is inf or Nan\n' % moment_order))
   continue
  if (log_moment < (moment_order * eps)):
   min_delta = min(min_delta, math.exp((log_moment - (moment_order * eps))))
 return min_delta

def _compute_delta ( log_moments , eps ) : min_delta = 1.0 for ( moment_order , log_moment ) in log_moments : if ( moment_order == 0 ) : continue if ( math . isinf ( log_moment ) or math . isnan ( log_moment ) ) : sys . stderr . write ( ( 'The %d-th order is inf or Nan\n' % moment_order ) ) continue if ( log_moment < ( moment_order * eps ) ) : min_delta = min ( min_delta , math . exp ( ( log_moment - ( moment_order * eps ) ) ) ) return min_delta
compute delta for given log_moments and eps .