From 0991a0d6bc70ee64ff5598e630bc709491585621 Mon Sep 17 00:00:00 2001 From: Nicolas Ayache Date: Fri, 3 Mar 2023 23:38:14 +0100 Subject: [PATCH] Doc/Michelson: redirect operations on mutez to interactive reference. --- docs/alpha/michelson.rst | 63 ++++------------------------------------ 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/docs/alpha/michelson.rst b/docs/alpha/michelson.rst index 9b5bd1e1f379..13082d178127 100644 --- a/docs/alpha/michelson.rst +++ b/docs/alpha/michelson.rst @@ -983,64 +983,13 @@ A detailed description of the following instructions can be found in the `intera Operations on Mutez ~~~~~~~~~~~~~~~~~~~ -Mutez (micro-Tez) are internally represented by a 64 bit signed -integers. There are restrictions to prevent creating a negative amount -of mutez. Operations are limited to prevent overflow and mixing them -with other numerical types by mistake. They are also mandatory checked -for under/overflows. - -- ``ADD`` - -:: - - :: mutez : mutez : 'S -> mutez : 'S - - > ADD / x : y : S => [FAILED] on overflow - > ADD / x : y : S => (x + y) : S - -- ``SUB_MUTEZ`` - -:: - - :: mutez : mutez : 'S -> option mutez : 'S - - > SUB_MUTEZ / x : y : S => None - iff x < y - > SUB_MUTEZ / x : y : S => Some (x - y) : S - -- ``MUL`` - -:: - - :: mutez : nat : 'S -> mutez : 'S - :: nat : mutez : 'S -> mutez : 'S - - > MUL / x : y : S => [FAILED] on overflow - > MUL / x : y : S => (x * y) : S - -- ``EDIV`` - -:: - - :: mutez : nat : 'S -> option (pair mutez mutez) : 'S - :: mutez : mutez : 'S -> option (pair nat mutez) : 'S - - > EDIV / x : 0 : S => None - > EDIV / x : y : S => Some (Pair (x / y) (x % y)) : S - iff y <> 0 - -- ``COMPARE``: Mutez comparison - -:: - - :: mutez : mutez : 'S -> int : 'S +A detailed description of the following instructions can be found in the `interactive Michelson reference manual `__. - > COMPARE / x : y : S => -1 : S - iff x < y - > COMPARE / x : y : S => 0 : S - iff x = y - > COMPARE / x : y : S => 1 : S - iff x > y +- ``ADD`` (`documentation `__). +- ``SUB_MUTEZ`` (`documentation `__). +- ``MUL`` (`documentation `__). +- ``EDIV`` (`documentation `__). +- ``COMPARE``: Mutez comparison (`documentation `__). Operations on contracts ~~~~~~~~~~~~~~~~~~~~~~~ -- GitLab