Explain fixed point types

This commit is contained in:
Alex Beregszaszi 2017-08-29 21:38:41 +01:00
parent c975bf87db
commit 76bd8c5769

View File

@ -79,6 +79,15 @@ Fixed Point Numbers
Fixed point numbers are not fully supported by Solidity yet. They can be declared, but Fixed point numbers are not fully supported by Solidity yet. They can be declared, but
cannot be assigned to or from. cannot be assigned to or from.
``fixed`` / ``ufixed``: Signed and unsigned fixed point number of various sizes. Keywords ``ufixedMxN`` and ``fixedMxN``, where ``M`` represent the number of bits taken by
the type and ``N`` represent how many decimal points are available. ``M`` must be divisible by 8 and goes from 8 to 256 bits. ``N`` must be between 0 and 80, inclusive.
``ufixed`` and ``fixed`` are aliases for ``ufixed128x19`` and ``fixed128x19``, respectively.
Operators:
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder)
.. index:: address, balance, send, call, callcode, delegatecall, transfer .. index:: address, balance, send, call, callcode, delegatecall, transfer
.. _address: .. _address: