aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-03-15 21:55:45 +0800
committerGitHub <noreply@github.com>2017-03-15 21:55:45 +0800
commit0c8a766146cf1416143a5b1a66050b8d6c233907 (patch)
treed8c307ff316496c26a7dbaf9f5a3a17d240dc030 /docs
parent6258fe71854824fb28edf49bbc244e079c9c4f78 (diff)
parent07d775294b0c3270ee9d7bd496837193919c3d94 (diff)
downloaddexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.tar.gz
dexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.tar.zst
dexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.zip
Merge pull request #1698 from ethereum/exp-notation
Fix scientific notation in number literals
Diffstat (limited to 'docs')
-rw-r--r--docs/types.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst
index f89a8ee5..243a9a0c 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -202,6 +202,9 @@ Octal literals do not exist in Solidity and leading zeros are invalid.
Decimal fraction literals are formed by a ``.`` with at least one number on
one side. Examples include ``1.``, ``.1`` and ``1.3``.
+Scientific notation is also supported, where the base can have fractions, while the exponent cannot.
+Examples include ``2e10``, ``-2e10``, ``2e-10``, ``2.5e1``.
+
Number literal expressions retain arbitrary precision until they are converted to a non-literal type (i.e. by
using them together with a non-literal expression).
This means that computations do not overflow and divisions do not truncate