1 for + - .* .+ .# ./ ~
2 for * / // \ ^ ^/
In-place operations allow
omittiing the right-hand side of
M
Basic Math and
O
Bitmask Operations.
The implicit operand then is 1
for the bitmask operations,
regular addition, subtraction and rounding,
the implicit operand is 2
for the regular multiplication, division,
power and root operations.
Add 1:
varname+
Subtract 1:
varname-
Multiply by 2:
varname*
Divide by 2:
varname/
Integer-divide by 2:
varname//
Modulo 2
(returns 1 for odd, 0 for even numbers):
varname\
Square:
varname^
Square Root:
varname^/
Get the LSB (least significant bit),
same effect as (varname\):
varname.*
Set the LSB:
varname.+
Toggle the LSB:
varname.#
Clear the LSB:
varname./
Eas:
a+
a-
a*
a/
a//
a\
a^
a^/
a~
a.*
a.+
a.#
a./
JS:
a++
a--
a*=2
a/=2
a=Math.floor(a/2)
a%=2
a*=a
a=Math.sqrt(a)
a=Math.round(a)
a&=1
a|=1
a^=1
a^=a&1
PHP:
$a++;
$a--;
$a*=2;
$a/=2;
$a>>=1;
$a%=2;
$a*=$a;
$a=sqrt($a);
$a=round($a);
$a&=1;
$a|=1;
$a^=1;
$a^=$a&1;