{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/libraries/Math.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "library Math {\n    uint256 public constant BONE = 10**18;\n    uint256 public constant TWO_BONES = 2 * 10**18;\n\n    function min(uint x, uint y) internal pure returns (uint z) {\n        z = x < y ? x : y;\n    }\n\n    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)\n    function sqrt(uint y) internal pure returns (uint z) {\n        if (y > 3) {\n            z = y;\n            uint x = y / 2 + 1;\n            while (x < z) {\n                z = x;\n                x = (y / x + x) / 2;\n            }\n        } else if (y != 0) {\n            z = 1;\n        }\n    }\n\n    /**\n     * @notice Returns the square root of an uint256 x using the Babylonian method\n     * @param y The number to calculate the sqrt from\n     * @param bone True when y has 18 decimals\n     */\n    function bsqrt(uint256 y, bool bone) internal pure returns (uint256 z) {\n      if (y > 3) {\n        z = y;\n        uint256 x = y / 2 + 1;\n        while (x < z) {\n          z = x;\n          if (bone) {\n            x = (bdiv(y, x) + x) / 2;\n          } else {\n            x = (y / x + x) / 2;\n          }\n        }\n      } else if (y != 0) {\n        z = 1;\n      }\n    }\n\n    function bmul(\n        uint256 a,\n        uint256 b //Bone mul\n    ) internal pure returns (uint256) {\n        uint256 c0 = a * b;\n        require(a == 0 || c0 / a == b, 'ERR_MUL_OVERFLOW');\n        uint256 c1 = c0 + (BONE / 2);\n        require(c1 >= c0, 'ERR_MUL_OVERFLOW');\n        uint256 c2 = c1 / BONE;\n        return c2;\n    }\n\n    function bdiv(\n        uint256 a,\n        uint256 b //Bone div\n    ) internal pure returns (uint256) {\n        require(b != 0, 'ERR_DIV_ZERO');\n        uint256 c0 = a * BONE;\n        require(a == 0 || c0 / a == BONE, 'ERR_DIV_INTERNAL'); // bmul overflow\n        uint256 c1 = c0 + (b / 2);\n        require(c1 >= c0, 'ERR_DIV_INTERNAL'); //  badd require\n        uint256 c2 = c1 / b;\n        return c2;\n    }\n}"
}