diff --git a/docs/source/math.rst b/docs/source/math.rst new file mode 100644 index 000000000..30d67124c --- /dev/null +++ b/docs/source/math.rst @@ -0,0 +1,24 @@ +Math +============================================= + +Provides assorted low-level math operations. + +max64(uint64 a, uint64 b) internal constant returns (uint64) +""""""""""""""""""""""""""""""""""""""""""""""""" + +Returns the largest of two uint64 numbers. + +min64(uint64 a, uint64 b) internal constant returns (uint64) +""""""""""""""""""""""""""""""""""""""""""""""""" + +Returns the smallest of two uint64 numbers. + +max64(uint256 a, uint256 b) internal constant returns (uint256) +""""""""""""""""""""""""""""""""""""""""""""""""" + +Returns the largest of two uint256 numbers. + +min64(uint256 a, uint256 b) internal constant returns (uint256) +""""""""""""""""""""""""""""""""""""""""""""""""" + +Returns the smallest of two uint256 numbers. diff --git a/docs/source/safemath.rst b/docs/source/safemath.rst index c1f9cc18c..892c45a77 100644 --- a/docs/source/safemath.rst +++ b/docs/source/safemath.rst @@ -8,17 +8,17 @@ assert(bool assertion) internal Throws an error if the passed result is false. Used in this contract by checking mathematical expressions. -safeMul(uint a, uint b) internal returns (uint) +mul(uint256 a, uint256 b) internal returns (uint256) """"""""""""""""""""""""""""""""""""""""""""""""" Multiplies two unisgned integers. Asserts that dividing the product by the non-zero multiplicand results in the multiplier. -safeSub(uint a, uint b) internal returns (uint) +sub(uint256 a, uint256 b) internal returns (uint256) """"""""""""""""""""""""""""""""""""""""""""""""" Checks that b is not greater than a before subtracting. -safeAdd(uint a, uint b) internal returns (uint) +add(uint256 a, uint256 b) internal returns (uint256) """"""""""""""""""""""""""""""""""""""""""""""""" -Checks that the result is greater than both a and b. +Checks that the result is greater than both a and b. \ No newline at end of file