public ExtDecimal inc() {
        if (type == Type.NUMBER) {
            return add(ONE);
        } else if (type == Type.POSITIVEZERO) {
            return ONE;
        } else if (type == Type.NEGATIVEZERO) {
            return ONE;
        } else if (type == Type.INFINITY) {
            return INFINITY;
        } else if (type == Type.NEGATIVEINFINITY) {
            return NEGATIVEINFINITY;
        } else {
            throw new UnsupportedOperationException("Unknown type");
        }
    }