Merge pull request #289 from ezynda3/master

update according to changes in #288
pull/299/head
Francisco Giordano 8 years ago committed by GitHub
commit 322a9598ab
  1. 24
      docs/source/math.rst
  2. 8
      docs/source/safemath.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.

@ -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.
Loading…
Cancel
Save