|
|
Last update(s):
REDUCE is the second-oldest computer algebra
system (the first was
MACSYMA,
developed at MIT). REDUCE was developed in the
early 1970s by Professor Anthony Hearn at the
University of Utah Physics (and later, Computer
Science) Department. Its original application was
algebra problems in high-energy physics and
quantum mechanics. REDUCE provides both symbolic
computation and high-precision integer and
floating-point arithmetic.
In the 1980s, REDUCE development moved to the RAND
Corporation in San Diego, CA, and later to the
Konrad-Zuse Zentrum in Berlin, Germany, then to
Universität Köln in Germany, and
finally, back to the RAND Corporation, where it
has its own
Web site
managed by its original author.
Like MACSYMA, REDUCE is implemented in Lisp,
but in a dialect called
Portable Standard Lisp
(PSL) that was developed at the University of
Utah.
PSL is unusual in the Lisp world in also having a
more-readable (for most non-Lisp programmers)
Algol-like representation,
RLISP, and it is that
form which is used in the REDUCE implementation.
There are about 263,000 lines of RLISP code
underneath REDUCE.
What books are available for REDUCE?
About a dozen. See the
redbooks bibliography,
and the REDUCE publications bibliographies:
red-a-f,
red-g-l,
and
red-m-z.
What documentation is available online for REDUCE?
The REDUCE manual is available in 56 PDF
files containing about 1600 pages of
documentation, stored in the directory
/usr/local/sys/reduce/reduce-3.6/solaris/doc.
Versions of the Reduce User
Manual are in the files
reduce.pdf and
reduce2.pdf; the latter
includes documentation of all of the
user-contributed packages included with REDUCE.
The REDUCE Web site has a
documentation page
with pointers to PDF versions of the manuals, and
an HTML-based help facility.
Unfortunately, there does not appear to be a help
system inside REDUCE.
What version of REDUCE do we have?
Our systems have just a single version of REDUCE.
You can see what is available like this:
If you run REDUCE with the default value of the X11
DISPLAY variable, it starts a GUI window
instead of running in the terminal window. Fancier
(typeset) output is then possible.
How do I use high-precision arithmetic?
Turn on the rounded flag, assign the
desired decimal precision to the
precision variable, and then enter
numerical expressions. Here is an example:
How do I make a simple 2-D function plot?
Reduce does not have a native plotting environment,
but as described in Chapter 41 (p. 289) of the
Reduce User Manual,
it can interface to the external
gnuplot program, like this:
We made a screen dump by running the X Window
Dump command in a separate terminal window,
piping its output into the ImageMagick
format-conversion tool:
xwd waits for you to move
the pointer into the desired window and click the
mouse to make the snapshot. The resulting image
looks like this:
The (x,y) plot data is stored in a
temporary file with a name something like
jones.plotdta1*, where the first part is
your Unix username. The file is left intact
when reduce exits, and you can copy it
into another more-sensibly-named file in a safe
place and then use
gnuplot directly to
produce improved views with better fonts and
thicker lines.
How do I make a 3-D surface plot?
As with 2-D plotting, Reduce invokes
gnuplot to do the work.
Here is a sample session:
The resulting plot is extremely poor, as shown
in this screen snapshot:
The problem here is that Reduce does not output the
(x,y,z) data in blocks of equal size, preventing
gnuplot from recognizing the
data as a surface mesh.
I'm working on machine X. Why does it
not have REDUCE?
REDUCE is a highly portable system, but needs
either Common Lisp or Portable Standard Lisp;
it is possible that neither is available on
your system. Contact local systems staff
to find out whether REDUCE can be installed.
Is there a
local mailing list
for questions about REDUCE?
No, there is not, but one can easily be created if
there is sufficient user demand. In the meantime,
students who use REDUCE in courses should direct
their questions to their instructors.
Questions and answers
In early 2009, Reduce was released as free
software. It has its own Web sites at
http://www.reduce-algebra.com/
and
http://reduce.sourceforge.net/.
As a result of this release, Reduce is once again
available on most of our major Unix platforms.
% which reduce
/usr/local/bin/reduce
% ls /usr/local/bin/reduce-*
/usr/local/bin/reduce-20080915
% env DISPLAY=reduce
REDUCE, 15-Sep-08 ...
1:
% reduce
...
1: on rounded;
2: precision 50;
12
3: sin(-7.5);
- 0.93799997677473885794846379814904723643183139550803
4: sin(1/256) / (1/256);
0.99999745687042983799221222193087945750276128903456
5: factorial(40);
815915283247897734345611269596115894272000000000
% reduce
...
1: load_package gnuplot;
2: plot(sin(x)/x,x=(-5 .. +5));
% xwd | convert - sin-x-over-x.png
% reduce
...
1: plot(sin(x^2 + y^2) / sqrt(x^2 + y^2) , x=(-12 .. +12), y=(-12 .. +12));