public static double sumsq(double[] values) {double sumsq = 0;for (double value : values) {sumsq += value * value;}return sumsq;}
public static double Sumsq(double[] values){double sumsq = 0;for (int i = 0, iSize = values.Length; i < iSize; i++){sumsq += values[i] * values[i];}return sumsq;}