public static double mean(long... values)
	{
		Parameters.checkCondition(values.length > 0);
		BigDecimal sum = BigDecimal.ZERO;
		for (long value : values) {
			sum = sum.add(BigDecimal.valueOf(value));
		}
		return sum.divide(BigDecimal.valueOf(values.length)).doubleValue();
	}
public static double mean ( long ... values ) { Parameters . checkCondition ( values . length > 0 ) ; BigDecimal sum = BigDecimal . ZERO ; for ( long value : values ) { sum = sum . add ( BigDecimal . valueOf ( value ) ) ; } return sum . divide ( BigDecimal . valueOf ( values . length ) ) . doubleValue ( ) ; }
Returns the arithmetic mean of the given values. This method is not
subject to overflow.

@param values the values.

@return the arithmetic mean of the given values.

@throws NullPointerException if {@code values} is {@code null}.
@throws IllegalArgumentException if {@code values} is empty.