Browse Source

update according to changes in #288

8 years ago
parent
commit
c254d8703d
2 changed files with 28 additions and 4 deletions
  1. 24 0
      docs/source/math.rst
  2. 4 4
      docs/source/safemath.rst

+ 24 - 0
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.

+ 4 - 4
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.
 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.
 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.
 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.