public String toString(FloatFormat ff, boolean compact) {
		String special = formatSpecialCase();
		if (special != null) {
			return special;
		}
		BigDecimal bd = toBigDecimal();
		bd = bd.round(ff.getDisplayContext());

		String str = bd.toString();
		int precision = bd.precision();
		int bdScale = bd.scale();

		// Generate compact representation if requested
		if (compact && precision > 2) {
			BigInteger encoding = ff.getEncoding(this);
			for (String newStr = str; newStr != null;) {
				newStr = removeFractionalDigit(newStr, 1, false);
				if (newStr != null) {
					bd = new BigDecimal(newStr);
					bd = bd.setScale(bdScale); // avoid scale change which may alter encoding
					BigFloat bf = ff.getBigFloat(bd);
					if (encoding.equals(ff.getEncoding(bf))) {
						str = newStr;
					}
					else {
						newStr = null; // stop compaction
					}
				}
			}
		}
		// Strip trailing zeros
		str = stripTrailingZeros(str, 1);
		// Ensure decimal point is present
		if (str.indexOf('.') < 0) {
			str += ".0";
		}
		return str;
	}
Perform appropriate rounding and conversion to BigDecimal prior to generating
a formatted decimal string of the specified BigFloat value.  
See {@link #toString(FloatFormat, boolean)},
{@link FloatFormat#toDecimalString(BigFloat)} and 
{@link FloatFormat#toDecimalString(BigFloat, boolean)}.
@param ff float format
@param compact if true the precision will be reduced to a form which is still equivalent at
the binary encoding level for the specified FloatFormat.
@return decimal string representation
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcode/floatformat/BigFloat.java