public BigFloat getBigFloat(BigDecimal value) {
		if (size == 8) {
			return getBigFloat(value.doubleValue());
		}
		if (size == 4) {
			return getBigFloat(value.floatValue());
		}

		BigDecimal val = value;
		if (val.equals(BigDecimal.ZERO)) {
			return BigFloat.zero(effective_frac_size, exp_size);
		}

		BigFloat bf;
		int scale10 = val.scale();
		if (scale10 < 0) {
			scale10 = -scale10;
			BigInteger scalar = BigInteger.valueOf(10).pow(scale10);
			if (scale10 / 0.3 > effective_frac_size) { // log10(2) = ~0.3
				// will be whole integer
				BigInteger intVal = scalar.multiply(val.unscaledValue());
				bf = getBigFloat(intVal);
			}
			else {
				// may have fractional value
				BigFloat scalarBf = getBigFloat(scalar);
				bf = getBigFloat(val.unscaledValue());
				bf.mul(scalarBf);
			}
		}
		else if (scale10 / 0.3 >= bias) { // log10(2) = ~0.3
			// divide down in two passes to avoid divide by infinity for edge case
			int s1 = scale10 / 2;
			BigInteger bs1 = BigInteger.valueOf(10).pow(s1);
			BigInteger bs2 = BigInteger.valueOf(10).pow(scale10 - s1);
			BigFloat bf2 = getBigFloat(bs2);
			if (bf2.isInfinite()) { // bf2 >= bf1
				return BigFloat.zero(effective_frac_size, exp_size, value.signum());
			}
			BigFloat bf1 = getBigFloat(bs1);
			bf = getBigFloat(val.unscaledValue());
			bf.div(bf1);
			bf.div(bf2);
		}
		else {
			BigInteger scalar = BigInteger.valueOf(10).pow(scale10);
			BigFloat scalarBf = getBigFloat(scalar);

			BigInteger whole = val.unscaledValue();
			bf = getBigFloat(whole);
			bf.div(scalarBf);
		}
		return bf;
	}
Constructs a {@code BigFloat} initialized to the value represented by the specified
{@code BigDecimal}.

@param value the decimal value.
@return value as a {@link BigFloat}
@throws NullPointerException if the string is null
@throws NumberFormatException if the string parse fails.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/floatformat/FloatFormat.java