String dblfmt(double[] d) {
            StringBuilder b = new StringBuilder();
            for (int i = 0; i < d.length - 1; i++) {
                b.append(String.format(Locale.US, fformat, d[i]));
                b.append(',');
            }
            b.append(String.format(Locale.US, fformat, d[d.length - 1]));
            return b.toString();
        }