The separator, just evaluates both
a and
b,
but returns only the result of
b.
The assignment operator. This assigns b to
a (a must be a valid lvalue) (note however that this operator
may be translated to == if used in a place where boolean
expression is expected)
The assignment operator. Assigns b to
a (a must be a valid lvalue). This is
different from = because it never gets translated to a
==.
Absolute value or modulus (if a
is a complex number).
See
Mathworld for more information.
Exponentiation, raises a to the bth power.
Element by element exponentiation. Raise each element of a matrix
a to the bth power. Or if
b is a matrix of the same size as
a, then do the operation element by element.
If a is a number and b is a
matrix then it creates matrix of the same size as
b with a raised to all the
different powers in b.
Addition. Adds two numbers, matrices, functions or strings. If
you add a string to anything the result will just be a string. If one is
a square matrix and the other a number, then the number is multiplied by
the identity matrix.
Subtraction. Subtract two numbers, matrices or functions.
Multiplication. This is the normal matrix multiplication.
Element by element multiplication if a and
b are matrices.
Division. When a and b are just numbers
this is the normal division. When they are matrices, then this is
equivalent to a*b^-1.
Element by element division. Same as a/b for
numbers, but operarates element by element on matrices.
Back division. That is this is the same as b/a.
Element by element back division.
The mod operator. This does not turn on the modular mode, but
just returns the remainder of a/b.
Element by element the mod operator. Returns the remainder
after element by element integer a./b.
Modular evaluation operator. The expression a
is evaluated modulo b. See the Section called Modular Evaluation.
Some functions and operators behave differently modulo an integer.
Factorial operator. This is like
1*...*(n-2)*(n-1)*n.
Double factorial operator. This is like
1*...*(n-4)*(n-2)*n.
Equality operator.
Returns true or false
depending on a and b being equal or not.
Inequality operator,
returns true if a does not
equal b else returns false.
Alternative inequality operator,
returns true if a does not
equal b else returns false.
Less than or equal operator,
returns true if a is
less than or equal to
b else returns false.
These can be chained as in a <= b <= c (can
also be combined with the less than operator).
Greater than or equal operator,
returns true if a is
greater than or equal to
b else returns false.
These can be chained as in a >= b >= c
(can also be combine with the greater than operator).
Less than operator,
returns true if a is
less than or equal to
b else returns false.
These can be chained as in a < b < c
(can also be combine with the less than or equal to operator).
Greater than operator,
returns true if a is
greater than or equal to
b else returns false.
These can be chained as in a > b > c
(can also be combine with the greater than or equal to operator).
Comparison operator. If a is equal to
b it returns 0, if a is less
than b it returns -1 and if
a is greater than b it
returns 1.
Logical and. Returns true if both
a and b are true,
else returns false. If given numbers, nonzero numbers
are treated as true.
Logical or.
Returns true if both
a or b are true,
else returns false. If given numbers, nonzero numbers
are treated as true.
Logical xor.
Returns true exactly one of
a or b is true,
else returns false. If given numbers, nonzero numbers
are treated as true.
Logical not. Returns the logical negation of a
Negation operator.
Variable referencing (to pass a reference to something).
See the Section called References in the Chapter called Programming with GEL.
Variable dereferencing (to access a referenced variable).
See the Section called References in the Chapter called Programming with GEL.
Matrix conjugate transpose.
Matrix transpose, does not conjugate the entries.
Get element of a matrix in row b and column
c. If b,
c are vectors, then this gets the corresponding
rows columns or submatrices.
Get row of a matrix (or rows if b is a vector).
Same as above.
Get column of a matrix (or columns if c is a
vector).
Same as above.
Get an element from a matrix treating it as a vector. This will
traverse the matrix row-wise.
Build a vector from a to b (or specify a row, column region for the @ operator). For example to get rows 2 to 4 of matrix A we could do
as 2:4 will return a vector
[2,3,4].
Build a vector from a to c
with b as a step. That is for example
genius> 1:2:9
=
`[1, 3, 5, 7, 9]
|
Make a imaginary number (multiply a by the
imaginary). Note that normally the number i is
written as 1i. So the above is equal to
Quote an identifier so that it doesn't get evaluated. Or
quote a matrix so that it doesn't get expanded.
Swap value of a with the value
of b. Currently does not operate
on ranges of matrix elements.
It returns null.
Available from version 1.0.13.
Increment the variable a by 1. If
a is a matrix, then increment each element.
This is equivalent to a=a+1, but
it is somewhat faster. It returns null.
Available from version 1.0.13.
Increment the variable a by b. If
a is a matrix, then increment each element.
This is equivalent to a=a+b, but
it is somewhat faster. It returns null.
Available from version 1.0.13.