static int compare(double[] a, double[] b) {
        if (a == b) {
            return 0;
        }
        if (a == null) {