code: public static double max( double []array , int offset , int length ) {
  		double max = -Double.MAX_VALUE;
  		for (int i = 0; i < length; i++) {
  			double tmp = array[offset+i];
  			if( tmp > max ) {
  				max = tmp;
  			}
  		}
  		return max;
  	}
docs: Returns the value of the element with the maximum value