public String toBinaryString() {
		switch (kind) {
			case QUIET_NAN:
				return "qNaN";
			case SIGNALING_NAN:
				return "sNaN";
			case INFINITE:
				if (sign < 0) {
					return "-inf";
				}
				return "+inf";
			case FINITE:
				String s = (sign < 0) ? "-" : "";

				int ascale = scale;

				String binary;
				if (this.isNormal()) {
					binary = "1." + unscaled.toString(2).substring(1);
					ascale += (unscaled.bitLength() - fracbits);
				}
				else { // subnormal
					assert (unscaled.bitLength() < fracbits);
					if (unscaled.equals(BigInteger.ZERO)) {
						return String.format("%s0b0.0", s);
					}
					binary =
						"0." + "0".repeat(fracbits - unscaled.bitLength() - 1) +
							unscaled.toString(2);
				}
				binary = binary.replaceAll("0*$", "");
				if (binary.endsWith(".")) {
					binary += "0";
				}
				return String.format("%s0b%s * 2^%d", s, binary, ascale);
			default:
				throw new AssertionError("unexpected kind " + kind);
		}
	}
If finite, the returned BigDecimal is exactly equal to this.  If not finite, one of the
FloatFormat.BIG_* constants is returned.

@return a BigDecimal or null if value is NaN (i.e., {@link FloatKind#QUIET_NAN} or 
{@link FloatKind#SIGNALING_NAN}).
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/floatformat/BigFloat.java