@Override
	public byte[] encodeRepresentation(String repr, MemBuffer buf, Settings settings, int length)
			throws DataTypeEncodeException {
		try {
			int len = getLength();
			if (floatFormat == null) {
				throw new DataTypeEncodeException(
					"Unsupported float format (" + len + " bytes)", repr, this);
			}
			if (length == 8 || length == 4) {
				double doubleValue = Double.parseDouble(repr);
				return encodeValue(doubleValue, buf, settings, length);
			}
			BigFloat bf = floatFormat.getBigFloat(repr);
			floatFormat.round(bf);
			return encodeValue(bf, buf, settings, length);
		}
		catch (DataTypeEncodeException e) {
			throw e;
		}
		catch (Exception e) {
			throw new DataTypeEncodeException(repr, this, e);
		}
	}
Get the encoded length (number of 8-bit bytes) of this float datatype.

@return encoded length of this float datatype.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractFloatDataType.java