|
|
Last update(s):
Tue Oct 18 15:51:37 2005
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:
% which reduce /usr/local/bin/reduce % ls /usr/local/bin/reduce-* ls: No match. % reduce Loading image file: /usr/local/sys/reduce/reduce-3.6/solaris/reduce.img REDUCE 3.6, 15-Jul-95, patched to 21 Oct 97 ... ...
The latest version announced at the Web site is 3.8, but our recent use of Reduce has not been sufficiently frequent to mandate an update.
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:
% 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
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:
% reduce ... 1: load_package gnuplot; 2: plot(sin(x)/x,x=(-5 .. +5));
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 | convert - sin-x-over-x.png
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:
% reduce ... 1: plot(sin(x^2 + y^2) / sqrt(x^2 + y^2) , x=(-12 .. +12), y=(-12 .. +12));
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. It is possible that this problem is corrected in the latest version of Reduce available from the vendor.
I'm working on machine X. Why does it not have REDUCE?
REDUCE is a commercial, albeit relatively-low-cost, system. We have licensed it only on our Sun Solaris SPARC systems.
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.