Genius Mathematics Tool and the GEL Language
[What is it] [Manual/Documentation] [Help out with Genius] [News] [Mailing List] [Requirements] [Download] [Screenshots]
Genius is a general purpose calculator program similiar in some aspects to BC,
Matlab, Maple or Mathematica. It is useful both as a simple calculator and as
a research or educational tool. The syntax is very intuitive and is designed
to mimic how mathematics is usually written. GEL is the name of its extention
language, it stands for Genius Extension Language, clever isn't it? In
fact, many of the standard genius functions are written in GEL itself.
What can it do?
An example expression can look like:
30*70 + 67^3.0 + ln(7) * (88.8/100) + |sin(40)| - 3i
Or perhaps to sum the first 70 terms of the harmonic series one would
do:
sum n=1 to 70 do 1/n
To define a function that takes the
square of a number and adds one, you could do:
function f(x) = x^2 + 1
To numerically integrate f from -1 to 1:
NumericalIntegral(f, -1, 1)
To factorize a number into primes:
Factorize(123456789)
To solve a linear system Ax=b:
SolveLinearSystem(A,b)
Given y' = x^2 + y, with initial condition y(0) = 0, to find
y(1) using Runge-Kutta with 20 increments:
RungeKutta (`(x,y) = x^2 + y, 0, 0, 1, 20)
The original goal of Genius was to build a better BC then BC. That goal has been attained and surpassed long ago with Genius not having much in common with BC anymore. It is now venturing into the territory of Matlab/Octave, Maple and Mathematica, though it is not quite any of these. I do not think it will ever be a replacement for any, but it is already a very good tool for experimentation, and I have used it in research many times.
What does Genius stand for?
I have no idea ... the G could be GNOME or GNU. I think it used to stand
for something and I forgot. So now it's just Genius. Originally the window
title was "GnomENIUS Calculator" but that just sounded stupid,
so that's not it either.
And of course Genius is free software, released under the GNU General Public License.
Future? That is, what will Genius do at some point in the future:
The manual is written in DocBook and is available for browsing in the GNOME help browser. You can also browse it here in HTML. Alternatively you can get the PDF version if you prefer.
You can also check the Function listing of a recent version. This is just the output of the help command of a recent version. The manual above has a much more information about the functions, even some links to Mathworld, Planetmath and Wikipedia.
There are a lot of things that can be done for genius, and I only have very limitted time. There are many ways you can help with genius:
Jun 10th 2008:
Release 1.0.3. Fixes, optimizations, few new functions, few improvements to GUI.
Nov 20th 2007:
Release 1.0.2. Couple of minor bug fixes and build fixes.
Nov 16th 2007:
Release 1.0.1. Lots of new stuff, both feature-wise and bugfix wise, See the NEWS file for more info.
Oct 17th 2007:
Genius is part of GARNOME now, as part of the "hacker-tools".
Oct 13th 2007:
I slightly updated the manual in subversion so I updated the web version as well.
Oct 8th 2007:
Released 1.0.0! Few new things, updated docs, bugfixes. No longer includes MPFR as that was too much work to keep the internal up to date and MPFR is now very common. See the NEWS file for more info.
Oct 1st 2007:
Release 1.0.0 will be forthcoming within a week or so. Nothing much new, but hell, if it has been pretty much 10 years in development and I do have a Ph.D. already, it deserves to be called 1.0.0.
Feb 2nd 2007:
Release 0.7.7. Mostly minor things. Improvements to the GUI, compute cubic and quartic roots properly. See the NEWS file for more info.
To subscribe to the Genius mailing list, send a message to minimalist@5z.com with a subject of "subscribe genius-list".
Here is the archive of this list
Genius is a program for UNIX or Linux type computers, so you need one of those. I do all my development on Ubuntu Linux nowdays, so you will probably have most luck with that or any other GNU based system. It is also possible to build under Mac OS X (see instructions) although I don't have access to Mac OS X so I can't verify that every release will in fact build cleanly there.
Genius includes a GNOME GUI frontend which requires GNOME2 and VTE (part of GNOME 2.2 and onward). Any recent Ubuntu, RedHat or Fedora Core or any other distro that has recent GNOME will do. Read below about MPFR and GtkSourceView. There are some RPMS available and perhaps there will be debs for Ubuntu. RPMS should build with rpmbuild using the tarball as it includes a specfile. If you don't have GNOME you can build the command line only version which does however still require at least glib2.
Genius requires readline. Get the newest version if you are having troubles.
Genius also requires the excellent GMP library for its number manipulations. This is a very optimized, multiple precision floating point and arbitrary precision int library which is just blazing fast and genius owes a large part of its speed to GMP. (speed is a relative thing, it's faster then bc, but hell of a lot slower then octave which uses native types)
Another requirement is MPFR an extension of GMP, which Genius uses for all floating point computations. Ubuntu has recent mpfr it seems (libmpfr1 and libmpfr-dev). Genius used to include a version of MPFR, but this was a pain. New enough (2.2+) MPFR is now fairly commonly installed.
You also need GtkSourceView which should now be fairly common with new enough GNOME to get the syntax highlighting and such (it's not required, but is very nice to have).
Tarball of the latest sources is at:
http://ftp.5z.com/pub/genius/
You probably want to install easy to use packages:
Ubuntu package is now in the repository (edgy and higher) in universe, so just install the package genius and gnome-genius (in hardy and higher). Search the Ubuntu packages site for genius and for gnome-genius.
Recent Debian also includes genius, install the package gnome-genius and genius. Search the Debian packages site for genius or gnome-genius.
Recent Fedora/RPM also includes Genius. Install the packages gnome-genius and genius on Fedora through yum. That's probably the best RPM to use. Look for the genius package on koji.fedoraproject.org.
If you use GARNOME, genius should be part of the "hacker-tools."
You should also be able to build an RPM with "rpmbuild -ta <tarball>", but this has not been tested recently.
New versions (source code tarballs) will also be on:
http://ftp.gnome.org/pub/GNOME/sources/genius/
Every program needs a screenshot! Right?
Screenshot of 1.0.1 showing a parametric plot of the butterfly curve.
Here's one of 0.6.2 (CVS Aug 4 '04) showing the new surface plotting using GtkExtra-2.
Here's one of 0.5.8 (CVS Mar 23 '04, 0.6.0 is very similar to this) showing the line plot improvements
Here's one of 0.5.7 and the source code editting using GtkSourceView
Here's one of 0.5.3 (CVS Feb 28 '03) and the very basic graph support
Here's one of 0.5.2 (actually doing my crypto homework right there :)
For nostalgia some pics from 1998, here is when it was still part of GNOME 0.13, first standalone release 0.1, and 0.2.0. Do note how you could switch between infix, postfix and prefix notation. No you can't do that anymore because that was stupid.