Math

Math

Git Source

Standard math utilities missing in the Solidity language.

stripped down version of OpenZeppelin's Math library to include only the log10 and log256 functions

Functions

log10

Return the log in base 10, rounded down, of a positive value. Returns 0 if given 0.

function log10(uint256 value) internal pure returns (uint256);

log256

Return the log in base 256, rounded down, of a positive value. Returns 0 if given 0. Adding one to the result gives the number of pairs of hex symbols needed to represent value as a hex string.

function log256(uint256 value) internal pure returns (uint256);

Last updated