public static BigDecimal toBigDecimal(float f) {
        byte[] bytes = new byte[15];
        int size = NumberUtils.writeFloat(bytes, 0, f, true);
        return parseBigDecimal(bytes, 0, size);
    }
All the positive powers of 10 that can be
represented exactly in double/float.
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java