mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5100 from ethereum/docs-fixedpoint
Rename remainder to modulo and update fixed point documentation
This commit is contained in:
commit
8d99d26c7c
@ -51,7 +51,7 @@ Operators:
|
|||||||
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
|
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
|
||||||
* Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation)
|
* Bit operators: ``&``, ``|``, ``^`` (bitwise exclusive or), ``~`` (bitwise negation)
|
||||||
* Shift operators: ``<<`` (left shift), ``>>`` (right shift)
|
* Shift operators: ``<<`` (left shift), ``>>`` (right shift)
|
||||||
* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (remainder), ``**`` (exponentiation)
|
* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (modulo), ``**`` (exponentiation)
|
||||||
|
|
||||||
|
|
||||||
Comparisons
|
Comparisons
|
||||||
@ -120,6 +120,7 @@ Exponentiation
|
|||||||
Exponentiation is only available for unsigned types. Please take care that the types
|
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.
|
you are using are large enough to hold the result and prepare for potential wrapping behaviour.
|
||||||
|
|
||||||
|
.. note::
|
||||||
Note that ``0**0`` is defined by the EVM as ``1``.
|
Note that ``0**0`` is defined by the EVM as ``1``.
|
||||||
|
|
||||||
.. index:: ! ufixed, ! fixed, ! fixed point number
|
.. index:: ! ufixed, ! fixed, ! fixed point number
|
||||||
@ -138,7 +139,7 @@ the type and ``N`` represents how many decimal points are available. ``M`` must
|
|||||||
Operators:
|
Operators:
|
||||||
|
|
||||||
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
|
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
|
||||||
* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder)
|
* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (modulo)
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The main difference between floating point (``float`` and ``double`` in many languages, more precisely IEEE 754 numbers) and fixed point numbers is
|
The main difference between floating point (``float`` and ``double`` in many languages, more precisely IEEE 754 numbers) and fixed point numbers is
|
||||||
|
Loading…
Reference in New Issue
Block a user