{
    "Function": "packTo56Bits",
    "File": "contracts/math/FloatingPoint56.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "Bitmap"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "getMSB"
    ],
    "Low-Level Calls": [],
    "Code": "function packTo56Bits(uint256 value) internal pure returns (uint56) {\n        uint256 bitShift;\n        // If the value is over the uint48 max value then we will shift it down\n        // given the index of the most significant bit. We store this bit shift \n        // in the least significant byte of the 56 bit slot available.\n        if (value > type(uint48).max) bitShift = (Bitmap.getMSB(value) - 47);\n\n        uint256 shiftedValue = value >> bitShift;\n        return uint56((shiftedValue << 8) | bitShift);\n    }"
}