public static boolean isInteger(BigDecimal decimal) {
        int scale = decimal.scale();
        if (scale == 0) {
            return true;
        }

        int precision = decimal.precision();
        if (precision < 20) {
            if (FIELD_DECIMAL_INT_COMPACT_OFFSET != -1) {
                long intCompact = UNSAFE.getLong(decimal, FIELD_DECIMAL_INT_COMPACT_OFFSET);
                switch (scale) {
                    case 1:
                        return intCompact % 10 == 0;
                    case 2:
                        return intCompact % 100 == 0;
                    case 3:
                        return intCompact % 1000 == 0;
                    case 4:
                        return intCompact % 10000 == 0;
                    case 5:
                        return intCompact % 100000 == 0;
                    case 6:
                        return intCompact % 1000000 == 0;
                    case 7:
                        return intCompact % 10000000 == 0;
                    case 8:
                        return intCompact % 100000000 == 0;
                    case 9:
                        return intCompact % 1000000000 == 0;
                    default:
                        break;
                }
            }
        }

        return decimal.stripTrailingZeros().scale() == 0;
    }
decimal is integer, check has non-zero small

@param decimal
@return
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java