docs: private static String arrayToString(double[] x, int num) {
      StringBuilder sb = new StringBuilder("(");
      if (num > x.length) {
        num = x.length;
      }
      for (int j = 0; j < num; j++) {
        sb.append(x[j]);
        if (j != x.length - 1) {
          sb.append(", ");
        }
      }
      if (num < x.length) {
        sb.append("...");
      }
      sb.append(")");
      return sb.toString();
    }