if (Coeff == 0) { i = 0; while (CF > Val[i]) { i++; } Coeff = Dev[i-1] + (Dev[i] - Dev[i-1]) * (CF-Val[i-1]) / (Val[i] - Val[i-1]); Coeff = Coeff * Coeff;
i = 0; while (CF > Val[i]) { i++;
  public static double addErrs(double N, double e, float CF){        double Val0, Pr;    int i;        if (Coeff == 0) {      i = 0;      while (CF > Val[i]) {	i++;      }      Coeff = Dev[i-1] +	(Dev[i] - Dev[i-1]) * (CF-Val[i-1]) / (Val[i] - Val[i-1]);      Coeff = Coeff * Coeff;    }    if (e == 0) {      return N * (1 - Math.exp(Math.log(CF) / N));    } else {      if (e < 0.9999) {        Val0 = N * (1 - Math.exp(Math.log(CF) / N));        return Val0 + e * (addErrs(N, 1.0, CF) - Val0);      } else {	if (e + 0.5 >= N) {	  return 0.67 * (N - e);        } else {	  Pr = (e + 0.5 + Coeff / 		2 + Math.sqrt(Coeff * ((e + 0.5) * (1 - (e + 0.5) / N) + Coeff / 4))) / 	    (N + Coeff);	  return (N * Pr - e);	}      }    }  }