docs: static double usingXAndYTables(final double[] xArr, final double[] yArr,
        final double x) {
      assert (xArr.length >= 4) && (xArr.length == yArr.length);
      if ((x < xArr[0]) || (x > xArr[xArr.length - 1])) {
        throw new SketchesArgumentException("X value out of range: " + x);
      }
      if (x == xArr[xArr.length - 1]) {
        return yArr[yArr.length - 1]; // corner case
      }
      final int offset = findStraddle(xArr, x); //uses recursion
      assert (offset >= 0) && (offset <= (xArr.length - 2));
      if (offset == 0) {
        return interpolateUsingXAndYTables(xArr, yArr, offset, x); // corner case
      }
      if (offset == (xArr.length - 2)) {
        return interpolateUsingXAndYTables(xArr, yArr, offset - 2, x); // corner case
      }
      return interpolateUsingXAndYTables(xArr, yArr, offset - 1, x);
    }