FEATURE

A free lunch, anybody?

Free maths software is available over the Internet, but Ray Girvan thinks that many users may still prefer to pay

The great English lexicographer, Dr Samuel Johnson, once remarked that 'No man but a blockhead ever wrote, except for money'. Early in March this year, a heated discussion broke out in the Slashdot forum over a post, 'Young programmer, stop advocating free software', arguing that Johnson's view should apply to software development. This conflict between hard-nosed commercialism and altruism goes beyond forum chat to the highest corporate levels, with Richard Stallman's Unix-clone GNU Project and Free Software Foundation at loggerheads with companies such as Microsoft and the SCO Group that are based on the paradigm of proprietary code. The issue of free software is clearly fightin' talk.

Actually, free software is an ambiguous term. As the GNU Project points out, this description doesn't preclude commercial possibilities. Its concept of 'free' should be taken in the sense of 'free speech' - freedom to use, copy, modify, and redistribute - not that of 'free beer'. There is, however, the overlapping category of 'freeware', which is genuinely cost-free to download. A large body of this is available on the academic and scientific circuit, without the altercations so often associated with the issue of free software. This article is a taster of the particular field of mathematical software.

  • Left: Scilab, similar to Matlab. Right: MuPAD, a full-featured algebra program.

As it happens, I use mathematical freeware often: the fractal generator Fractint. Although, for most users, it's an art toy rather than a serious mathematical tool, it shows the dynamics by which freeware can work successfully. Its originators were the Stone Soup Group, named after an Eastern European folktale where a peddler persuades starving villagers to share scraps of hoarded food to augment his 'stone soup', until finally they have a nourishing meal to share. In the same way, the four primary authors have developed Fractint, via user contributions of code, into one of the most popular, versatile, and well-established fractal programs.

I found Fractint on a bulletin board, but this (or the Internet equivalent) isn't the ideal place to look for professional-grade software; the quality ranges from excellent down to the worst amateur offerings, pejoratively nicknamed 'crudware'. It's better to start from university and government sites, where listing implies at least a reasonable standard. Some major sites include GAMS, NetLIB and SymbolicNet. GAMS is the National Institute of Standards and Technology (NIST) guide to available mathematical software. It provides, as well, an index of other mathematical software sources, and a topic tree - for instance, interpolation /univariate data / polynomials - leading to library code for that application. Many of the GAMS citations are for NetLIB, a filetap (ftp) repository of useful numerical and scientific routines, such as the classic Fortran 77 Lapack linear algebra suite that underlies Matlab itself. The focus of SymbolicNet is, as you'd expect, symbolic and algebraic computation, and it lists ftp sites for code and many stand-alone freeware packages.

Matlab clones are a very significant category of general-purpose freeware. While the relatively high price of Matlab is a factor in their continuing existence, there are so many that one might suspect the proliferation to stem mostly from an urge to reinvent the wheel. But the chronology often reveals parallel evolution, starting in the early 1980s when the power of matrix-based numerical computation was realised. Many academic departments took the same view as Cleve Moler (Matlab's creator): that matrix programming could be harnessed with an interface that disposed of the nitpicking Fortran syntax with its declaration of variables. Octave, probably the closest clone, was originally conceived by John W Eaton of the University of Wisconsin as a companion program for a textbook, so that students could solve chemical engineering problems without spending all their time debugging Fortran. Available at www.octave.org, it's freely distributable under the GNU General Public License (GPL), either as source code or binaries for Unix/Linux and Windows. Scilab, developed at INRIA (in French, acronym for National Institute for Research in Computer Science and Control) is 'similar but not a clone'. This too is free (from scilabsoft.inria.fr) and has a slant toward scientific applications, with system control and signal processing modules, and a flowchart-style dynamic system simulator, Scicos, akin to Matlab's Simulink. Other packages of this type include Euler, featuring interval arithmetic, and TeLa (Tensor Language), which 'targets numerical simulation pre- and post-processing work'.

There are rather fewer freeware symbolic algebra packages, which probably reflects the greater investment of skill and time required to program them. This investment can be prohibitive, and some freeware is free as a result of products falling on hard times. Axiom, for example, started life in the 1970s as an IBM research tool called Scratchpad; renamed, it was sold in the 1990s to NAG (the Numerical Algorithms Group) who made it a commercial system - ultimately an unsuccessful one withdrawn from sale in 2001. NAG agreed to release it, and now the Axiom Project is continuing its development as free software under Linux. Another classic system, Macsyma, has gone through similar hardships. Very much ahead of its time, it originated at MIT in the 1960s, and by the 1990s the version sold by Macsyma Inc. had become one of the most affordable and powerful computer algebra systems (in 1994, it was joint winner in Michael Wester's benchmark tests). But in mid-2000, following acquisition by Symbolics Inc., it disappeared from the map. A close relative, Maxima, is still alive and being nurtured, again under the GNU GPL, at sourceforge.net/projects/maxima. Judging by the large to-do lists, I'd have to conclude that both Axiom and Maxima count as enthusiasts' projects rather than routine ready-to-run applications.

MuPAD - the other co-winner of Wester's battle of programs - has weathered funding problems altogether better. This computer algebra system was devised and developed at the University of Paderborn, Germany, to incorporate unusual features on top of the usual numeric and symbolic functions: centrally, object-oriented programming; user-definable data types; and accessible library code. Early in 1998, a tightening of funding for the project forced the MuPAD Group into the decision to set up a commercial wing to safeguard MuPAD's future development. This has gone well, with SciFace Software and MacKichan Software marketing the latest MuPAD Pro, while freeware versions (MuPAD Light for Windows and MuPAD 2.5.3 for Linux, both with optional Scicos) remain available for academic and individual non-commercial use. The mathematical repertoire is the same, but the Light versions lack source-code debuggers and have a 'bare bones' command interface - a single-window command-line format with separate plot windows - rather than the integrated notebook with text, inline graphics, and OLE support interface of the Pro. Free MuPADs, incidentally, aren't public domain and require a licence. The designation 'the open computer algebra system' doesn't mean open source in the GNU free-to-tinker sense, only that the source is visible. Even so, MuPAD Light is easy to install, trouble-free in operation, and I think provides superb value and functionality for a freeware maths program.

As well as these general packages, there are huge numbers of special-purpose ones. A random skim of the excellent listing of mathematical software at the University of Haifa mathematics department (math.haifa.ac.il/msoftware.html) gives an idea of the scope. There's Fermat, a Mac, Windows, and Linux algebra package, strongly optimised for polynomial and matrix algebra over the rationals and finite fields; FELIX, for computation in commutative and non-commutative rings and modules; PARI/GP, a French-developed computer-algebra system designed for fast computations in number theory; Coq, for theorem-proving in calculus; and GRTensor II, a Maple/Mathematica add-in for differential geometry.

This leads into a final category of freeware. Even if you use a commercial mathematics package, user-contributed and other free modules are a useful resource. Wolfram's MathSource, now part of the Mathematica Information Center, has over 650 Mathematica packages and programs categorised for various sciences. The Mathworks has a similar corpus of Matlab M-files, the Maple Application Centre likewise for Maple.

Is there a catch? Potentially, and it sums up as TANSTAAFL (Robert Heinlein's acronym for 'there ain't no such thing as a free lunch' coined in his science fiction novel The Moon is a Harsh Mistress). This applies to freeware, where the free lunch really only lasts until you've downloaded the source files. Then, depending on the program, you may need to invest time in fiddly compilation and installation, to learn to use a rough-and-ready interface, and to adapt it to your needs; and then you have to rely on self-support, or user-forum and academic support systems that may be less prompt than commercial ones. Ultimately, some users will prefer to play it safe and pay for well-known commercial software, where there are the advantages of general polish, automatic and reliable installation, and guaranteed channels for support and upgrade. But in an academic environment, structures may exist for developing and fine-tuning software as part of student or research work, and a freeware package may simply be the only tool specialised enough for the job. It's a path that many choose to take, and don't regret.

Analysis and opinion
Feature

Robert Roe looks at research from the University of Alaska that is using HPC to change the way we look at the movement of ice sheets

Feature

Robert Roe talks to cooling experts to find out what innovation lies ahead for HPC users

Analysis and opinion