Here you can find the source of sum(final float[] x)
public static float sum(final float[] x)
//package com.java2s; //License from project: Apache License public class Main { public static float sum(final float[] x) { if (x == null) { throw new RuntimeException("diff function encountered null input"); }/*from ww w. j a v a 2 s .com*/ float s = 0f; for (int i = 0; i < x.length; ++i) s += x[i]; return s; } }