Compute <code>\sum_{i=s}^e 1/log(1+i)</code>

@param s Start value
@param e End value (inclusive!)
@return Sum
519119
public static double sumInvLog1p(int s, int e) {
    double sum = 0.;
    // Iterate e + 1 .. s + 1, descending for better precision
    for(int i = e + 1; i > s; i--) {
      sum += 1. / FastMath.log(i);
    }
    return sum;
  }
819320
public void calculateEndPoints(double start, double stop) {

		Point p1 = points.get(0);
		if (p1.getX().doubleValue() != start) {
			points.add(0, new Point(start, p1.getY()));
		}

		int end = points.size();
		Point p2 = points.get(end - 1);
		if (p2.getY().doubleValue() != stop) {
			points.add(end, new Point(stop, p2.getY()));
		}
	}
273482
public final synchronized void add(final double v) {
    sum0 += 1;
    sum1 += v;
    sum2 += v * v;
    min = Math.min(min, v);
    max = Math.max(max, v);
    if (Math.abs(v) < com.simiacryptus.util.data.ScalarStatistics.zeroTol) {
      zeros++;
    }
    else {
      if (v < 0) {
        negatives++;
      }
      else {
        positives++;
      }
      sumLog += Math.log10(Math.abs(v));
    }
  }
178939
public double getSum() {
        double sum = s.zero();
        for (int c = 0; c < this.values.length; c++) {
            sum = s.plus(sum, values[c]);
        }
        return sum;
    }
641877
public NumberExpression<T> sum() {
        if (sum == null) {
            sum = Expressions.numberOperation(getType(), Ops.AggOps.SUM_AGG, mixin);
        }
        return sum;
    }
719628
@SuppressWarnings("unchecked")
  public static <E, C extends Counter<E>> C scale(C c, double s) {
    C scaled = (C) c.getFactory().create();
    for (E key : c.keySet()) {
      scaled.setCount(key, c.getCount(key) * s);
    }
    return scaled;
  }
312397
long yearsUntil(Symmetry010Date end) {
        long startYear = this.prolepticYear * 512L + this.getDayOfYear();
        long endYear = end.prolepticYear * 512L + end.getDayOfYear();
        return (endYear - startYear) / 512L;
    }
831380
public Object evaluate(float fraction, Object startValue, Object endValue) {
        int startInt = (Integer) startValue;
        int startA = (startInt >> 24) & 0xff;
        int startR = (startInt >> 16) & 0xff;
        int startG = (startInt >> 8) & 0xff;
        int startB = startInt & 0xff;

        int endInt = (Integer) endValue;
        int endA = (endInt >> 24) & 0xff;
        int endR = (endInt >> 16) & 0xff;
        int endG = (endInt >> 8) & 0xff;
        int endB = endInt & 0xff;

        return (int) ((startA + (int) (fraction * (endA - startA))) << 24) |
                (int) ((startR + (int) (fraction * (endR - startR))) << 16) |
                (int) ((startG + (int) (fraction * (endG - startG))) << 8) |
                (int) ((startB + (int) (fraction * (endB - startB))));
    }
309994
private double logLikelihood(int[] contingencyTable) {
        // Rename for short-hand convenience
        int[] t = contingencyTable;
        int col1sum = t[0] + t[2];
        int col2sum = t[1] + t[3];
        int row1sum = t[0] + t[1];
        int row2sum = t[2] + t[3];
        double sum = row1sum + row2sum;
        
        // Calculate the expected values for a, b, c, d
        double aExp = (row1sum / sum) * col1sum;
        double bExp = (row1sum / sum) * col2sum;
        double cExp = (row2sum / sum) * col1sum;
        double dExp = (row2sum / sum) * col2sum;

        return 2 *
            ((t[0] * Math.log(t[0] - aExp))  +
             (t[1] * Math.log(t[1] - bExp))  +
             (t[2] * Math.log(t[2] - cExp))  +
             (t[3] * Math.log(t[3] - dExp)));
    }
674867
public double getSum() {
        double sum = s.zero();
        for (int c = 0; c < this.size(); c++) {
            sum = s.plus(sum, getValue(c));
        }
        return sum;
    }
788517
public TreeMap<Bits, Long> computeSums() {
    final TreeMap<Bits, Long> sums = new TreeMap<Bits, Long>();
    long total = 0;
    for (final Entry<Bits, AtomicInteger> e : this.map.entrySet()) {
      sums.put(e.getKey(), total += e.getValue().get());
    }
    return sums;
  }
289465
public static float sum(float[] c) {
		float s = 0;
		for (int i = 0; i < c.length; i++) {
			s+=c[i];
		}
		return s;
	}
576681
protected int intValue(final char op, final String s) {
        final int result = Integer.parseInt(s);
        if (op == '-') {
            return -1 * result;
        }
        return result;
    }
1241901
public static double intPow(double b, int e) {
    double result = 1.0;
    double currPow = b;
    while (e > 0) {
      if ((e & 1) != 0) {
        result *= currPow;
      }
      currPow *= currPow;
      e >>= 1;
    }
    return result;
  }
1020626
public static int sum (int zero, Iterable<? extends Number> values)
    {
        for (Number value : values) {
            zero += value.intValue();
        }
        return zero;
    }
1107291
public static int getElIndexInSameTags(Element e) {
        Elements chs = e.parent().children();
        int index = 1;
        for (Element cur : chs) {
            if (e.tagName().equals(cur.tagName())) {
                if (e.equals(cur)) {
                    return index;
                } else {
                    index++;
                }
            }
        }
        return index;
    }
1271565
function(string, start, end) {
  var crc = 0
  var x = 0;
  var y = 0;
  crc = crc ^ (-1);

  for(var i = start, iTop = end; i < iTop;i++) {
  	y = (crc ^ string[i]) & 0xFF;
    x = table[y];
  	crc = (crc >>> 8) ^ x;
  }

  return crc ^ (-1);
}