private static double toDouble(Object obj) {
		if (obj instanceof Double) {
			return (Double) obj;
		}
		if (obj instanceof Float) {
			return (Float) obj;
		}
		if (obj instanceof Short) {
			// Looking at AbstractFloatDataType#getValue, this makes no sense to me
			return (Short) obj;
		}
		if (obj instanceof BigDecimal) {
			BigDecimal bd = (BigDecimal) obj;
			return bd.doubleValue();
		}
		throw new IllegalArgumentException(obj + "(" + obj.getClass() + ")");
	}
Base class for a variety of Complex data types of different sizes and types.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractComplexDataType.java