mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Explain the difference between floating and fixed point
This commit is contained in:
parent
76bd8c5769
commit
435eeec5e1
@ -103,11 +103,6 @@ This is a limitation of the EVM and will be solved with the next protocol update
|
||||
|
||||
Returning variably-sized data as part of an external transaction or call is fine.
|
||||
|
||||
How do you represent ``double``/``float`` in Solidity?
|
||||
======================================================
|
||||
|
||||
This is not yet possible.
|
||||
|
||||
Is it possible to in-line initialize an array like so: ``string[] myarray = ["a", "b"];``
|
||||
=========================================================================================
|
||||
|
||||
|
@ -88,6 +88,12 @@ Operators:
|
||||
* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``)
|
||||
* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder)
|
||||
|
||||
.. note::
|
||||
The main difference between floating point (``float`` and ``double`` in many languages, more precisely IEEE 754 numbers) and fixed point numbers is
|
||||
that the number of bits used for the integer and the fractional part (the part after the decimal dot) is flexible in the former, while it is strictly
|
||||
defined in the latter. Generally, in floating point almost the entire space is used to represent the number, while only a small number of bits define
|
||||
where the decimal point is.
|
||||
|
||||
.. index:: address, balance, send, call, callcode, delegatecall, transfer
|
||||
|
||||
.. _address:
|
||||
|
Loading…
Reference in New Issue
Block a user