static double doubleMax(Iterable l) { double max = negativeInfinity(); fOr (double d : l) max = Math.max(max, d); ret max; } static double doubleMax(double[] l) { double max = negativeInfinity(); fOr (double d : l) max = Math.max(max, d); ret max; } static double doubleMax(double[] l, int from, int to) { double max = negativeInfinity(); for (int i = from; i < to; i++) max = Math.max(max, l[i]); ret max; }