public static int[] breakIntoDigits(long number) {

        // Symmetric positive value is out of range => - Long.MIN_VALUE == Long.MIN_VALUE !!
        if (number == Long.MIN_VALUE) { // -9223372036854775808, just return its representation.
            return new int[] { -9, -2, -2, -3, -3, -7, -2, -0, -3, -6, -8, -5, -4, -7, -7, -5, -8, -0, -8 };
        }
        if (number <= 9 && number >= -9) {
            return new int[] { (int) number };
        }

        int sgn = 1;
        if (number < 0) {
            sgn = -1;
        }

        int length = (int) Math.floor(Math.log10(number * sgn)) + 1;
        int[] digits = new int[length];

        for (int i = 0; i < length; i++) {
            digits[length - 1 - i] = (int) (number % 10);
            number = number / 10;
        }
        return digits;
    }