private double findChange(Expr old, Expr nu) {
        if (old == null || nu == null)
            return 0;

        if (old.type != nu.type)
            return 0;

        if (nu instanceof ExprNumber) {
            return Math.abs(((ExprNumber) old).doubleValue() -
                    ((ExprNumber) nu).doubleValue());
        }

        if (nu instanceof ExprArray) {
            Expr[] oldA = ((ExprArray) old).getInternalArray();
            Expr[] nuA = ((ExprArray) nu).getInternalArray();

            double change = 0;
            for (int i = 0; i < oldA.length && i < nuA.length; i++) {
                double c = findChange(oldA[i], nuA[i]);
                if (c > change)
                    change = c;
            }

            return change;
        }

        return 0;
    }