diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-27 01:00:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 01:00:23 +0800 |
commit | 8d99d26c7c21bd5c049be1f35d20eabcdddfee4e (patch) | |
tree | ee02a05c285b9e4014e76e08356936bc2e4689a3 | |
parent | a17ca003ccd125f68ea7d472a2e006c64c1cc1b1 (diff) | |
parent | a0b58696d8ad22301f5fb1f2b418c26a42352fdd (diff) | |
download | dexon-solidity-8d99d26c7c21bd5c049be1f35d20eabcdddfee4e.tar.gz dexon-solidity-8d99d26c7c21bd5c049be1f35d20eabcdddfee4e.tar.zst dexon-solidity-8d99d26c7c21bd5c049be1f35d20eabcdddfee4e.zip |
Merge pull request #5100 from ethereum/docs-fixedpoint
Rename remainder to modulo and update fixed point documentation
-rw-r--r-- | docs/types.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/types.rst b/docs/types.rst index 3dc95ac2..43291af8 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -51,7 +51,7 @@ Operators: * Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``) * Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation) * Shift operators: ``<<`` (left shift), ``>>`` (right shift) -* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (remainder), ``**`` (exponentiation) +* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (modulo), ``**`` (exponentiation) Comparisons @@ -120,7 +120,8 @@ Exponentiation Exponentiation is only available for unsigned types. Please take care that the types you are using are large enough to hold the result and prepare for potential wrapping behaviour. -Note that ``0**0`` is defined by the EVM as ``1``. +.. note:: + Note that ``0**0`` is defined by the EVM as ``1``. .. index:: ! ufixed, ! fixed, ! fixed point number @@ -138,7 +139,7 @@ the type and ``N`` represents how many decimal points are available. ``M`` must Operators: * Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``) -* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder) +* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (modulo) .. note:: The main difference between floating point (``float`` and ``double`` in many languages, more precisely IEEE 754 numbers) and fixed point numbers is |