public BigInteger getEncoding(BigFloat value) {
		if (value == null) {
			return getBigNaNEncoding(false);
		}

		switch (value.kind) {
			case QUIET_NAN:
			case SIGNALING_NAN:
				return getBigNaNEncoding(false);
			case INFINITE:
				return getBigInfinityEncoding(value.sign < 0);
			case FINITE:
				break;
		}
		if (value.isZero()) {
			return getBigZeroEncoding(value.sign < 0);
		}
		int exp;
		BigInteger fraction;

		int lb_unscaled = leadBit(value.unscaled);
		if (value.scale - value.fracbits + lb_unscaled >= -bias) {
			// normal case
			exp = value.scale - value.fracbits + 1 + lb_unscaled + bias;
			int leadBit = frac_size - (jbitimplied ? 0 : 1);
			fraction = roundToLeadBit(value.unscaled, leadBit);
			// if carry..
			if (leadBit(fraction) > frac_size) {
				fraction = fraction.shiftRight(1);
				exp += 1;
			}
			if (jbitimplied) {
				fraction = fraction.clearBit(frac_size);
			}
		}
		else if (!jbitimplied) {
			// subnormals are not supported
			return getBigZeroEncoding(value.sign < 0);
		}
		else {
			// subnormal
			exp = 0;
			int n = value.scale - value.fracbits + lb_unscaled + bias + frac_size;
			if (n < 0) {
				// XXX is it possible to round up to a non-zero in this situation?
				return getBigZeroEncoding(value.sign < 0);
			}
			fraction = roundToLeadBit(value.unscaled, n);
		}
		if (exp >= maxexponent) {
			return getBigInfinityEncoding(value.sign < 0);
		}

		BigInteger result = BigInteger.valueOf(exp).shiftLeft(exp_pos).or(fraction);
		if (value.sign < 0) {
			result = result.setBit(signbit_pos);
		}
		return result;
	}
Decode {@code encoding} to a SmallFloatData using this format.

NB: this method should not be used if {@link #size}>8

@param encoding the encoding
@return the decoded value as a SmallFloatData
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/floatformat/FloatFormat.java