aboutsummaryrefslogtreecommitdiffstats
path: root/docs/units-and-global-variables.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-15 20:04:40 +0800
committerchriseth <chris@ethereum.org>2018-02-15 20:52:17 +0800
commit2b5a5a8669cee8698f3f2cf970417a7123fbbe25 (patch)
treeeb5d78372cd7f849d7a6a2bc49cbb1280bf78ecc /docs/units-and-global-variables.rst
parent5746e2d7d867440780ced524dd7e7c29149cf3e2 (diff)
downloaddexon-solidity-2b5a5a8669cee8698f3f2cf970417a7123fbbe25.tar.gz
dexon-solidity-2b5a5a8669cee8698f3f2cf970417a7123fbbe25.tar.zst
dexon-solidity-2b5a5a8669cee8698f3f2cf970417a7123fbbe25.zip
Make addmod and mulmod revert if the last argument is zero.
Diffstat (limited to 'docs/units-and-global-variables.rst')
-rw-r--r--docs/units-and-global-variables.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst
index ce58cf56..8f49c600 100644
--- a/docs/units-and-global-variables.rst
+++ b/docs/units-and-global-variables.rst
@@ -107,9 +107,9 @@ Mathematical and Cryptographic Functions
----------------------------------------
``addmod(uint x, uint y, uint k) returns (uint)``:
- compute ``(x + y) % k`` where the addition is performed with arbitrary precision and does not wrap around at ``2**256``.
+ compute ``(x + y) % k`` where the addition is performed with arbitrary precision and does not wrap around at ``2**256``. Assert that ``k != 0`` starting from version 0.5.0.
``mulmod(uint x, uint y, uint k) returns (uint)``:
- compute ``(x * y) % k`` where the multiplication is performed with arbitrary precision and does not wrap around at ``2**256``.
+ compute ``(x * y) % k`` where the multiplication is performed with arbitrary precision and does not wrap around at ``2**256``. Assert that ``k != 0`` starting from version 0.5.0.
``keccak256(...) returns (bytes32)``:
compute the Ethereum-SHA-3 (Keccak-256) hash of the :ref:`(tightly packed) arguments <abi_packed_mode>`
``sha256(...) returns (bytes32)``: