Skip to content

Commit

Permalink
docs: add int256 to types
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Apr 14, 2021
1 parent 3d6be58 commit 8894a56
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,61 @@ Operator Description
Short-circuiting of boolean operators (``or`` and ``and``) is consistent with
the behavior of Python.

.. index:: ! int128, ! int, ! integer
.. index:: ! int256, ! int, ! integer

Signed Integer (256 bit)
------------------------

**Keyword:** ``int256``

A signed integer (256 bit) is a type to store positive and negative integers.

Values
******

Signed integer values between -2\ :sup:`255` and (2\ :sup:`255` - 1), inclusive.

Interger literals cannot have a decimal point even if the decimal value is zero. For example, ``2.0`` cannot be interpreted as an integer.

Operators
*********

Comparisons
^^^^^^^^^^^

Comparisons return a boolean value.

========== ================
Operator Description
========== ================
``x < y`` Less than
``x <= y`` Less than or equal to
``x == y`` Equals
``x != y`` Does not equal
``x >= y`` Greater than or equal to
``x > y`` Greater than
========== ================

``x`` and ``y`` must be of the type ``int256``.

Arithmetic Operators
^^^^^^^^^^^^^^^^^^^^

============= ======================
Operator Description
============= ======================
``x + y`` Addition
``x - y`` Subtraction
``-x`` Unary minus/Negation
``x * y`` Multiplication
``x / y`` Division
``x**y`` Exponentiation
``x % y`` Modulo
============= ======================

``x`` and ``y`` must be of the type ``int256``.

.. index:: ! int128

Signed Integer (128 bit)
------------------------
Expand Down

0 comments on commit 8894a56

Please sign in to comment.