Commit 277608e6 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Docbookize the manual, patch and docbook by Kai Willadsen


Tue Dec 21 18:13:52 2004  George Lebl <jirka@5z.com>

	* configure.in, Makefile.am, src/gnome-genius.c, help/*:
	  Docbookize the manual, patch and docbook by Kai Willadsen
	  <kaiw@itee.uq.edu.au>

	* src/funclib.c, src/calc.c: correct some help problems

	* src/gnome-genius.c: don't show the "manual" menu entry since we
	  now just show the help files directly.

	* src/calc.[ch], src/genius.c, src/gnome-genius.c, src/funclib.c:
	  Display the help functions and the manual
parent fb1d122a
Tue Dec 21 18:13:52 2004 George Lebl <jirka@5z.com>
* configure.in, Makefile.am, src/gnome-genius.c, help/*:
Docbookize the manual, patch and docbook by Kai Willadsen
<kaiw@itee.uq.edu.au>
* src/funclib.c, src/calc.c: correct some help problems
* src/gnome-genius.c: don't show the "manual" menu entry since we
now just show the help files directly.
* src/calc.[ch], src/genius.c, src/gnome-genius.c, src/funclib.c:
Display the help functions and the manual
Fri Dec 17 09:58:48 2004 George Lebl <jirka@5z.com>
* src/lexer.l: remove the warning killing hack since it doesn't work
......
if INTERNAL_MPFR
MAYBE_MPFR = mpfr
endif
SUBDIRS = $(MAYBE_MPFR) vicious-extensions gtkextra src pixmaps lib doc po
SUBDIRS = $(MAYBE_MPFR) vicious-extensions gtkextra src pixmaps lib po help
mimeinfodir = $(datadir)/mime-info
mimeinfo_DATA = genius.keys genius.mime
......@@ -36,3 +36,5 @@ genius-function-list.txt: src/genius
src/genius --version > genius-function-list.txt
echo "------------------------------------------" >> genius-function-list.txt
echo help | src/genius >> genius-function-list.txt
distuninstallcheck_listfiles = find . -type f -print | grep -v '^\./var/scrollkeeper' | grep -v 'omf' | grep -v 'figures'
......@@ -215,10 +215,10 @@ fi
])
warning_flags=
realsave_CFLAGS="$CFLAGS"
AC_MSG_CHECKING(for more warnings, including -Werror)
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
warning_flags="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror"
warning_flags="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
CFLAGS="$warning_flags $CFLAGS"
for option in -Wno-sign-compare; do
......@@ -255,12 +255,17 @@ dnl warn the user, we do this on the end so that the user notices
AC_CHECK_FUNC(wordexp,AC_DEFINE(HAVE_WORDEXP),
[AC_MSG_WARN([*** You don't have wordexp, glob will be used instead ***])])
dnl scrollkeeper checks
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
fi
AC_OUTPUT([
genius.spec
Makefile
src/Makefile
doc/Makefile
lib/Makefile
lib/calculus/Makefile
lib/combinatorics/Makefile
......@@ -277,6 +282,8 @@ pixmaps/Makefile
pixmaps/32x32/Makefile
pixmaps/48x48/Makefile
po/Makefile.in
help/Makefile
help/C/Makefile
])
echo "
......
......@@ -50,6 +50,10 @@ UMD=`which update-mime-database 2>/dev/null`
if [ "$UMD" != "" ]; then
update-mime-database %{prefix}/share/mime
fi
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
%postun
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
%install
rm -rf $RPM_BUILD_ROOT
......@@ -58,6 +62,7 @@ make prefix=$RPM_BUILD_ROOT%{prefix} install
rm -f $RPM_BUILD_ROOT%{prefix}/share/mime/XMLnamespaces
rm -f $RPM_BUILD_ROOT%{prefix}/share/mime/globs
rm -f $RPM_BUILD_ROOT%{prefix}/share/mime/magic
rm -rf $RPM_BUILD_ROOT%{prefix}/var/scrollkeeper
%clean
rm -rf $RPM_BUILD_ROOT
......@@ -78,3 +83,6 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/mime-info/*
%{prefix}/share/mime/*/*
%{prefix}/share/icons/*/*/*/*
%{_datadir}/gnome/help/genius/*/*.xml
%{_datadir}/gnome/help/genius/*/figures/*.png
%{_datadir}/omf/genius/genius-*.omf
figdir = figures
docname = genius
lang = C
omffile = genius-C.omf
entities = about.xml \
examples.xml \
gel-absolute-value-modulus.xml \
gel-comparison-operators.xml \
gel-conditionals.xml \
gel-error-handling.xml \
gel-function-list.xml \
gel-functions.xml \
gel-loading-programs.xml \
gel-loops.xml \
gel-lvalues.xml \
gel-matrix-support.xml \
gel-matrix-transpose.xml \
gel-modular-evaluation.xml \
gel-operator-list.xml \
gel-polynomials.xml \
gel-previous-result.xml \
gel-references.xml \
gel-returning.xml \
gel-separator.xml \
gel-startup-procedure.xml \
gel-sums-products.xml \
gel-values.xml \
gel-variables.xml \
genius.xml \
legal.xml \
prefs-display.xml \
prefs-precision.xml \
prefs-terminal.xml \
starting-to-start.xml \
starting-when-start.xml \
usage-create-program.xml \
usage-open-program.xml \
usage-workarea.xml
include $(top_srcdir)/help/xmldocs.make
dist-hook: app-dist-hook
DISTCLEANFILES = genius-C.omf.out
#
# Text version
#
# Run this by hand for now
#genius.txt: $(entities)
# docbook2txt genius.xml
manualdir = $(datadir)/genius
manual_DATA = genius.txt
EXTRA_DIST = genius.txt
<para> &app; was written by Jiri (George) Lebl (<email>jirka@5z.com</email>). To find more information about &app;, please visit the <ulink url="http://www.jirka.org/genius.html" type="http">Genius Web
page</ulink>.
</para>
<para>
To report a bug or make a suggestion regarding this application or
this manual, follow the directions in this
<ulink url="ghelp:gnome-feedback" type="help">document</ulink>.
</para>
<para> This program is distributed under the terms of the GNU
General Public license as published by the Free Software
Foundation; either version 2 of the License, or (at your option)
any later version. A copy of this license can be found at this
<ulink url="ghelp:gpl" type="help">link</ulink>, or in the file
COPYING included with the source code of this program. </para>
<para>
Here is a function that calculates factorials:
<programlisting><![CDATA[function f(x) = if x <= 1 then 1 else (f(x-1)*x)
]]></programlisting>
</para>
<para>
With indentation it becomes:
<programlisting><![CDATA[function f(x) = (
if x <= 1 then
1
else
(f(x-1)*x)
)
]]></programlisting>
</para>
<para>
This is a direct port of the factorial function from the <application>bc</application> manpage. The syntax seems similar to <application>bc</application>, but different in that in GEL, the last expression is the one that is returned. Using the <command>return</command> function instead, it would be:
<programlisting><![CDATA[function f(x) = (
if (x <= 1) then return (1);
return (f(x-1) * x)
)
]]></programlisting>
</para>
<para>
This is a smaller, nicer, iterative version, that uses the product loop:
<programlisting>function f(x) = prod k=1 to x do k
</programlisting>
</para>
<para>
Here is a larger example, this basically redefines the internal <command>ref</command> function to calculate the same thing, but is written in GEL:
<programlisting><![CDATA[# Calculate the row-echelon form of a matrix
function MyOwnREF(m) = (
if not IsMatrix(m) or not IsValueOnly(m) then
(error("ref: argument not a value only matrix");bailout);
s = min(rows(m), columns(m));
i = 1;
d = 1;
while d <= s and i <= columns(m) do (
# This just makes the anchor element non-zero if at
# all possible
if m@(d,i) == 0 then (
j = d+1;
while j <= rows(m) do (
if m@(j,i) == 0 then
(j=j+1;continue);
a = m@(j,);
m@(j,) = m@(d,);
m@(d,) = a;
j = j+1;
break
)
);
if m@(d,i) == 0 then
(i=i+1;continue);
# Here comes the actual zeroing of all but the anchor
# element rows
j = d+1;
while j <= rows(m)) do (
if m@(j,i) != 0 then (
m@(j,) = m@(j,)-(m@(j,i)/m@(d,i))*m@(d,)
);
j = j+1
);
m@(d,) = m@(d,) * (1/m@(d,i));
d = d+1;
i = i+1
);
m
)
]]></programlisting>
</para>
<sect1 id="genius-gel-absolute-value-modulus">
<title>Absolute value / Modulus</title>
<para>
You can make an absolute value of something by putting the |'s around it.
<programlisting>|a-b|
</programlisting>
</para>
<para>
In case the expression is a complex number the result will be the modulus
(distance from the origin). So for example:
<programlisting>|3 * e^(1i*pi)|
</programlisting>
returns 3.
</para>
</sect1>
<sect1 id="genius-gel-comparison-operators">
<title>Comparison operators</title>
<para>
==,&gt;=,&lt;=,!=,&lt;&gt;,&lt;,&gt; return true or false
</para>
<para>
!= and &lt;&gt; are the same thing and mean "is not equal to". Make sure
you use == for equality however, as = will have the same outcomes as
it does in C.
</para>
<para>
&lt;=&gt; returns -1 if left side is smaller, 0 if both sides are equal, 1 if left side is larger
</para>
<para>
To build up logical expressions use the words "not","and","or","xor"
</para>
<para>
"or" and "and" are special beasts as they evaluate their arguemnts one by one, so the usual trick for conditional evaluation works here as well. (e.g., "1 or a=1" will not set a=1 since the first argument was true)
</para>
</sect1>
<sect1 id="genius-gel-conditionals">
<title>Conditionals</title>
<para>
Syntax:
<programlisting><![CDATA[if <expression1> then <expression2> [else <expression3>]
]]></programlisting>
If <command>else</command> is omitted, then if the <command>expression1</command> yields 0, <command>NULL</command> is returned.
</para>
<para>
Examples:
<programlisting><![CDATA[if(a==5)then(a=a-1)
if b<a then b=a
if c>0 then c=c-1 else c=0
a = ( if b>0 then b else 1 )
]]></programlisting>
Note that <command>=</command> will be translated to <command>==</command> if used inside the expression for <command>if</command>, so
<programlisting>if a=5 then a=a-1
</programlisting>
will be interpreted as:
<programlisting>if a==5 then a:=a-1
</programlisting>
</para>
</sect1>
<sect1 id="genius-gel-error-handling">
<title>Error handling</title>
<para>
If you detect an error in your function, you can bail out of it. For normal errors, such as wrong types of arguments, you can fail to compute the function by adding the empty statement <command>bailout</command>. If something went really wrong and you want to completely kill the current computation, you can use <command>exception</command>.
</para>
<para>
Look at lib.gel for some examples.
</para>
</sect1>
This diff is collapsed.
<sect1 id="genius-gel-functions">
<title>Using Functions</title>
<para>
Syntax:
<programlisting>FunctionName([argument1, argument2, ...])
</programlisting>
Example:
<programlisting>Factorial(5)
cos(2*pi)
</programlisting>
</para>
<para>
To evaluate a function, enter the name of the function, followed by the arguments (if any) to the function in parentheses. This will return the result of applying the function to its arguments. The number of arguments to the function is, of course, different for each function.
</para>
<para>
There are many built-in functions, such as <command>sin</command>, <command>cos</command> and <command>tan</command>. You can use the <command>help</command> built-in function to get a list of available functions, or see <xref linkend="genius-gel-function-list" /> for a full listing.
</para>
<tip>
<title>Using Tab completion</title>
<para>
You can use Tab completion to get &appname; to complete function names for you. Try typing the first few letters of the name and pressing <userinput>Tab</userinput>.
</para>
</tip>
<important>
<title>Function names are case sensitive</title>
<para>
The names of functions are case sensitive. That means that functions named <command>dosomething</command>, <command>DOSOMETHING</command> and <command>DoSomething</command> are all different functions.
</para>
</important>
<sect2 id="genius-gel-functions-defining">
<title>Defining functions</title>
<para>
Syntax:
<programlisting><![CDATA[function <identifier>(<comma separated arguments>) = <function body>
<identifier> = (`() = <function body>)
]]></programlisting>
The <command>`</command> is the backquote character, and signifies an anonymous function. By setting it to a variable name you effectively define a function.
</para>
<para>
A function takes zero or more comma separated arguments, and returns the result of the function body. Defining your own functions is primarily a matter of convenience; one possible use is to have sets of functions defined in GEL files which &appname; can load in order to make available.
</para>
<para>
Example:
<programlisting>function addup(a,b,c) = a+b+c
</programlisting>
then <command>addup(1,4,9)</command> yields 14
</para>
</sect2>
<sect2 id="genius-gel-functions-variable-argument-lists">
<title>Variable argument lists</title>
<para>
If you include <command>...</command> after the last argument name in the function declaration, then &appname; will allow any number of arguments to be passed in place of that argument. If no arguments were passed then that argument will be set to <command>null</command>. Otherwise, it will be a horizontal vector containing all the arguments. For example:
<programlisting>function f(a,b...) = b
</programlisting>
Then <command>f(1,2,3)</command> yields <command>[2,3]</command>, while <command>f(1)</command> yields <command>null</command>.
</para>
</sect2>
<sect2 id="genius-gel-functions-passing-functions">
<title>Passing functions to functions</title>
<para>
In &appname;, it is possible to pass a function as an argument to another function. This can be done using either &lsquo;function nodes&rsquo; or anonymous functions.
</para>
<para>
If you do not enter the parentheses after a function name, instead of being evaluated, the function will instead be returned as a &lsquo;function node&rsquo;. The function node can then be passed to another function.
</para>
<para>
Example:
<programlisting>function f(a,b) = a(b)+1;
function b(x) = x*x;
f(b,2)
</programlisting>
</para>
<para>
If you want to pass a function that doesn&rsquo;t exist yet, you can use an anonymous function (see <xref linkend="genius-gel-functions-defining" />).
</para>
<para>
Syntax:
<programlisting><![CDATA[function(<comma separated arguments>) = <function body>
`(<comma separated arguments>) = <function body>
]]></programlisting>
</para>
<para>
Example:
<programlisting>function f(a,b) = a(b)+1;
f(`(x) = x*x,2)
</programlisting>
</para>
</sect2>
<sect2 id="genius-gel-functions-operations">
<title>Operations on functions</title>
<para>
Some functions allow arithmetic operations, and some single argument functions such as <command>exp</command> or <command>ln</command>, to operate on the function. For example,
<programlisting>exp(sin*cos+4)
</programlisting>
will return a function that does
<programlisting>exp(sin(x)*cos(x)+4)
</programlisting>
This can be useful when quickly defining functions. For example to create a function to perform the above operation, you can just type:
<programlisting>f = exp(sin*cos+4)
</programlisting>
</para>
<para>
This can also be used in plotting. For example, to plot sin squared you can enter:
<programlisting>LinePlot(sin^2)
</programlisting>
</para>
<warning>
<para>
Not all functions can be used in this way. In addition, when you use a binary operation the functions must take the same arguments.
</para>
</warning>
</sect2>
</sect1>
<sect1 id="genius-gel-loading-programs">
<title>Loading programs</title>
<para>
Sometimes you have a larger program that you wrote into a file and want to read in that file. In these situations, you have two options. You can keep the functions you use most inside the <filename>~/.geniusinit</filename> file. Or if you want to load up a file in a middle of a session (or from within another file), you can type <command>load &lt;list of filenames&gt;</command> at the prompt. This has to be done on the top level and not inside any function or whatnot, and it cannot be part of any expression. It also has a slightly different syntax then the rest of genius, more similiar to a shell. You can enter the file in quotes. If you use the '' quotes, you will get exactly the string that you typed, if you use the "" quotes, special characters will be unescaped as they are for strings. Example:
<programlisting>load program1.gel program2.gel
load "Weird File Name With SPACES.gel"
</programlisting>
There are also <command>cd</command>, <command>pwd</command> and <command>ls</command> commands built in. <command>cd</command> will take one argument, <command>ls</command> will take an argument which is like the glob in the unix shell (i.e., you can use wildcards). <command>pwd</command> takes no arguments. For example:
<programlisting>cd directory_with_gel_programs
ls *.gel
</programlisting>
</para>
</sect1>
<sect1 id="genius-gel-loops">
<title>Loops</title>
<sect2 id="genius-gel-loops-while">
<title>While loops</title>
<para>
Syntax:
<programlisting><![CDATA[while <expression1> do <expression2>
until <expression1> do <expression2>
do <expression2> while <expression1>
do <expression2> until <expression1>
]]></programlisting>
</para>
<para>
These are similiar to other languages, however they return the result of the last iteration or <command>NULL</command> if no iteration was done. In the boolean expression, <command>=</command> is translated into <command>==</command> just as for the <command>if</command> statement.
</para>
</sect2>
<sect2 id="genius-gel-loops-for">
<title>For loops</title>
<para>
Syntax:
<programlisting><![CDATA[for <identifier> = <from> to <to> do <body>
for <identifier> = <from> to <to> by <increment> do <body>
]]></programlisting>
</para>
<para>
Loop with identifier being set to all values from <command>&lt;from&gt;</command> to <command>&lt;to&gt;</command>, optionally using an increment other then 1. These are faster, nicer and more compact then the normal loops such as above, but less flexible. The identifier must be an identifier and can't be a dereference. The value of identifier is the last value of identifier, or <command>&lt;from&gt;</command> if body was never evaluated. The variable is guaranteed to be initialized after a loop, so you can safely use it. Also the <command>&lt;from&gt;</command>, <command>&lt;to&gt;</command> and <command>&lt;increment&gt;</command> must be non complex values. The <command>&lt;to&gt;</command> is not guaranteed to be hit, but will never be overshot, for example the following prints out odd numbers from 1 to 19:
<programlisting>for i = 1 to 20 by 2 do print(i)
</programlisting>
</para>
</sect2>
<sect2 id="genius-gel-loops-foreach">
<title>Foreach loops</title>
<para>
Syntax:
<programlisting><![CDATA[ for <identifier> in <matrix> do <body>
]]></programlisting>
</para>
<para>
For each element, going row by row from left to right do the body. To
print numbers 1,2,3 and 4 in this order you could do:
<programlisting>for n in [1,2:3,4] do print(n)
</programlisting>
</para>
<para>
If you wish to run through the rows and columns of a matrix, you can use
the RowsOf and ColumnsOf functions which return a vector of the rows or
columns of the matrix. So,
<programlisting>for n in RowsOf ([1,2:3,4]) do print(n)
</programlisting>
will print out [1,2] and then [3,4].
</para>
</sect2>
<sect2 id="genius-gel-loops-break-continue">
<title>Break and continue</title>
<para>
You can also use the <command>break</command> and <command>continue</command> commands in loops. The continue <command>continue</command> command will restart the current loop at its next iteration, while the <command>break</command> command exits the current loop.
<programlisting><![CDATA[while(<expression1>) do (
if(<expression2>) break
else if(<expression3>) continue;
<expression4>
)
]]></programlisting>
</para>
</sect2>
</sect1>
<sect1 id="genius-gel-lvalues">
<title>Lvalues</title>
<para>
An lvalue is the left hand side of an assignment. In other words, an lvalue is what you assign something to. Valid lvalues are:
<variablelist>
<varlistentry>
<term><command>a</command></term>
<listitem>
<para>identifier</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>*a</command></term>
<listitem>
<para>dereference of an identifier</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>a@(&lang;region&rang;)</command></term>
<listitem>
<para>a region of a matrix (where the region is specified normally as with the regular @() operator)</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Examples:
<programlisting>a=4
*tmp = 89
a@(4..8,3)=[1,2,3,4,5]'
</programlisting>
</para>
</sect1>
<sect1 id="genius-gel-matrix-support">
<title>Matrix support</title>
<para>
To enter matrixes use one of the following two syntaxes. You can either enter
the matrix separating values by commas and rows by semicolons, or separating
values by tabs (not usually easily possible on the console, only in files)
and rows by returns, or any combination of the two. So to enter a 3x3 matrix
of numbers 1-9 you could do
<programlisting>[1,2,3;4,5,6;7,8,9]
</programlisting>
or
<programlisting>[1 2 3
4 5 6
7 8 9]
</programlisting>
or
<programlisting>[1, 2, 3
4, 5, 6
7, 8, 9]
</programlisting>
Do not use both ';' and return at once on the same line though. Also
do not mix tabs and commas. It is just safest to use commas as separators.
</para>
<para>
You can also use the matrix expansion functionality to enter matricies.
For example you can do:
<programlisting>a = [ 1, 2, 3
4, 5, 6
7, 8, 9]
b = [ a, 10
11, 12]
</programlisting>
and you should get
<programlisting>[1 2 3 10
4 5 6 10
7 8 9 10
11 11 11 12]
</programlisting>
similiarly you can build matricies out of vectors and other stuff like that.
</para>
<para>
Another thing is that non-specified spots are initialized to 0, so
<programlisting>[1, 2, 3
4, 5
6]
</programlisting>
will end up being
<programlisting>
[1 2 3
4 5 0
6 0 0]
</programlisting>
</para>
<note>
<para>
Be careful about using whitespace and returns for expressions inside the <command>[ ]</command> brackets, as they have a slightly different meaning and could mess you up.
</para>
</note>
</sect1>
<sect1 id="genius-gel-matrix-transpose">
<title>Conjugate transpose and transpose operator</title>
<para>
You can conjugate transpose a matrix by using the <command>'</command> operator. For example:
<programlisting>[1,2,3]*[4,5,6]'
</programlisting>
We transpose the second vector to make matrix multiplication possible.
</para>
<para>
If you just want to transpose a matrix without conjugating it, you would
use the <command>.'</command> operator. For example:
<programlisting>[1,2,3]*[4,5,6i].'
</programlisting>
</para>
</sect1>
<sect1 id="genius-gel-modular-evaluation">
<title>Modular evaluation</title>
<para>
Sometimes when working with large numbers, it might be faster if results are
modded after each calculation. To use it you just add "mod &lt;integer&gt;" after
the expression.
</para>
<para>
Example:
<programlisting>2^(5!) * 3^(6!) mod 5
</programlisting>
</para>
<para>
You can calculate the inverses of numbers mod some integer by just using
rational numbers (of course the inverse has to exist).
</para>
<para>
Examples:
<programlisting>10^-1 mod 101
1/10 mod 101
</programlisting>
</para>
<para>
You can also do modular evaluation with matrices including taking inverses,
powers and dividing.
</para>
<para>
Example:
<programlisting>A = [1,2;3,4]
B = A^-1 mod 5
A*B mod 5
</programlisting>
</para>
<para>
This should yield the identity matrix as B will be the inverse of A mod 5.
</para>
</sect1>
<sect1 id="genius-gel-operator-list">
<title>List of GEL operators</title>
<programlisting><![CDATA[
a;b separator, just evaluates both but returns only b
a=b assignment operator asigns 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)
a:=b assignment operator asigns b to a (a must be a valid lvalue)
|a| absolute value
a^b exponentiation
a.^b element by element exponentiation
a+b addition
a-b subtraction
a*b multiplication
a.*b element by element multiplication
a/b division
a./b element by element division
a\b back division
a.\b element by element back division
a%b the mod operator
a.%b element by element the mod operator
a mod b mod evaluation operator (expression a evaluated mod b)
a! factorial operator
a!! double factorial operator
a==b equality operator (returns 1 or 0)
a!=b inequality operator (returns 1 or 0)
a<>b alternative inequality operator (returns 1 or 0)
a<=b inequality operator (returns 1 or 0)
a>=b inequality operator (returns 1 or 0)
a<=>b comparison operator (returns -1, 0 or 1)
a and b logical and
a or b logical or
a xor b logical xor
not a logical not
-a negation operator
&a variable referencing (to pass a reference to something)
*a variable dereferencing (to access a referenced varible)
a' matrix conjugate transpose
a.' matrix transpose
a@(b,c) get element of a matrix (or elements if b,c are vectors)