code: public static double[] breaks(double min, double max, int k) {
          if (k <= 1) {
              throw new IllegalArgumentException("Invalid number of bins: " + k);
          }
  
          if (min > max) {
              throw new IllegalArgumentException("Invalid lower and upper bounds: " + min + " > " + max);
          }
          
          double h = (max - min) / k;
          return breaks(min, max, h);
      }
docs: Returns the breakpoints between histogram cells for a given range.
  @param min the lower bound of bins.
  @param max the upper bound of bins.
  @param k the number of bins.
  @return the breakpoints between histogram cells