private ExtDecimal factorial() {
        if (type == Type.NUMBER) {
            if (compareTo(ONE) != 1) {
                return ONE;
            } else {
                return multiply(dec().factorial());
            }
        } else if (type == Type.POSITIVEZERO) {
            return ONE;
        } else if (type == Type.NEGATIVEZERO) {
            return ONE;
        } else if (type == Type.INFINITY) {
            return INFINITY;
        } else {
            throw new UnsupportedOperationException("Factorial of ".toString());
        }
    }