### Question:
FloatArrays { public static float mean(float... input) { validateArray(input); return sum(input) / input.length; } private  FloatArrays(); static boolean inRange(float d1, float d2, float range); static float[] reverse(float[] input); static float[] convert(int[] input); static float[][] convert(int[][] input); static float[] convert(double[] input); static boolean arrayEqualsInRange(float[] d1, float[] d2, float range); static boolean arrayEquals(float[] d1, float[] d2); static float[] appendZeros(float[] darray, int zeroAmountToAppend); static float[] normalize16bitLittleEndian(byte[] bytez); static float[] normalize16bitLittleEndian(byte[] bytez, int amount); static byte[] denormalize16BitLittleEndian(float[] input); static int[] toUnsignedInteger(float[] input, int max); static int[] toInteger(float[] input, int min, int max); static float max(float... input); static void trimValues(float[] input, float minVal, float maxVal); static float absMax(float... input); static String format(float... input); static String format(int fractionDigits, float... input); static String format(int fractionDigits, String delimiter, float... input); static String format(int rightPad, int fractionDigits, String delimiter, float... input); static float min(float... input); static float absMin(float... input); static void validateArray(float... input); static int maxIndex(float... input); static int minIndex(float... input); static float sum(float... input); static float[] sum(float[] a1, float[] a2); static void addToFirst(float[] first, float[] second); static void addToAll(float[] data, float valueToAdd); static void addToFirstScaled(float[] first, float[] second, float scale); static float[] square(float... input); static void squareInPlace(float... input); static float[] subtract(float[] a1, float[] a2); static void subtractFromFirst(float[] first, float[] second); static float[] multiply(float[] a1, float[] a2); static float dotProduct(float[] a1, float[] a2); static void multiplyToFirst(float[] first, float[] second); static float[] scale(float[] a1, float b); static void scaleInPlace(float[] a1, float b); static float mean(float... input); static float absoluteSumOfDifferences(float[] a, float[] b); static float[] absoluteDifference(float[] a, float[] b); static void validateArrays(float[] a1, float[] a2); static float squaredSum(float[] array); static float squaredSumOfDifferences(float[] a, float[] b); static float variance(float[] input); static float standardDeviation(float[] a); static boolean containsNaN(float[] a); static boolean containsNanOrInfinite(float[] a); static void floorInPlace(float[] var, float minValue); static void nonZeroFloorInPlace(float[] data, float floor); static void normalizeInPlace(float[] data); static float[] fromString(String str, String delimiter); static void serialize(DataOutputStream dos, float[] data); static void serializeRaw(DataOutputStream dos, float[] data); static void serialize(DataOutputStream dos, float[][] data); static void serializeRaw(DataOutputStream dos, float[][] data); static float[] deserialize(DataInputStream dis); static float[] deserializeRaw(DataInputStream dis, int amount); static void deserializeRaw(DataInputStream dis, float[] result); static float[][] deserialize2d(DataInputStream dis); static void deserialize2DRaw(DataInputStream dis, float[][] result); static float[][] clone2D(float[][] result); static float[] to1D(float[][] matrix); static float[][] toMatrix(float[] vector, int dimension); static float[][] loadFromText(File input); static final float[] ZERO_LENGTH_ARRAY; static final float[][] ZERO_LENGTH_MATRIX; static final Pattern FEATURE_LINES_PATTERN; }### Answer:
@Test public void testMean() { float[] da = {1, 2, 0, -1, -3}; Assert.assertTrue(inDelta(FloatArrays.mean(da), -1f / 5f)); }