Mercurial Hosting > luan
diff website/src/manual.html.luan @ 1680:9ef19f5ea973
add // operator
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 02 Jun 2022 22:34:55 -0600 |
parents | 0046c5eb3315 |
children | 19df8abc9805 |
line wrap: on
line diff
--- a/website/src/manual.html.luan Tue May 31 15:39:58 2022 -0600 +++ b/website/src/manual.html.luan Thu Jun 02 22:34:55 2022 -0600 @@ -292,6 +292,12 @@ </p></li> <li><p> +<b>"idiv": </b> +the <code>//</code> operation. +Behavior similar to the "add" operation. +</p></li> + +<li><p> <b>"mod": </b> the <code>%</code> operation. Behavior similar to the "add" operation. @@ -1270,7 +1276,8 @@ <li><b><code>+</code>: </b>addition</li> <li><b><code>-</code>: </b>subtraction</li> <li><b><code>*</code>: </b>multiplication</li> -<li><b><code>/</code>: </b>division</li> +<li><b><code>/</code>: </b>float division</li> +<li><b><code>//</code>: </b>floor division</li> <li><b><code>%</code>: </b>modulo</li> <li><b><code>^</code>: </b>exponentiation</li> <li><b><code>-</code>: </b>unary minus</li> @@ -1281,6 +1288,10 @@ </p> <p> +Floor division (//) is a division that rounds the quotient towards minus infinity, that is, the floor of the division of its operands. +</p> + +<p> Modulo is defined as the remainder of a division that rounds the quotient towards minus infinite (floor division). (The Java modulo operator is not used.)