public double interp(final double x1p, final double x2p) {
    int i,j,k;
    i = (x1terp.cor!=0) ? x1terp.hunt(x1p) : x1terp.locate(x1p);
    j = (x2terp.cor!=0) ? x2terp.hunt(x2p) : x2terp.locate(x2p);
    for (k=i;k<i+mm;k++) {
      x2terp.yy = y[k];
      yv[k] = x2terp.rawinterp(j,x2p);
    }
    return x1terp.rawinterp(i,x1p);
  }