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