Department of Mathematics - University of Utah

HomeComputingCourse SchedulesCSMECurrent PositionsFAQ (Computing)FormsGraduateHigh SchoolLecture VideosMailbox AccessMath BiologyMath EducationNewsletterPeopleResearchRTG GrantsSeminars


Last update(s): Tue May 15 17:21:54 2012                Valid HTML 4.0!

Table of contents

  1. What is REDUCE?
  2. What books are available for REDUCE?
  3. What documentation is available online for REDUCE?
  4. What version of REDUCE do we have?
  5. How do I use high-precision arithmetic?
  6. How do I make a simple 2-D function plot?
  7. How do I make a 3-D surface plot?
  8. I'm working on machine X. Why does it not have REDUCE?
  9. Is there a local mailing list for questions about REDUCE?

Questions and answers

  1.   What is REDUCE?

    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.

    In early 2009, Reduce was released as free software. It has its own Web sites at and As a result of this release, Reduce is once again available on most of our major Unix platforms.

    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. In mid-2012, there are about 706,000 lines of RLISP code, 312,000 lines of standard Lisp code, and 1,766,000 lines of C code, in a REDUCE snapshot.

    Recent versions of REDUCE can also be hosted on top of Codemist Standard Lisp (CSL), and most of our 2012-vintage REDUCE installations use that alternative. When both are available, you can invoke them specifically with the command names reduce-csl and reduce-psl. The name reduce is then a symbolic link to one of those.

  2.   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.

  3.   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.

    In mid-2012, a new version of REDUCE supplied 16 additional PDF documentation files:


    On some of our systems, you may be able to replace -csl by -psl in the pathnames; the PDF files are identical in both filesystem trees.

    There is also a historical overview, REDUCE: The First Forty Years , written by its chief architect, and stored in the local file /usr/local/src/reduce/reduce40.pdf.

    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.

  4.   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
    % ls /usr/local/bin/reduce-*
    /usr/local/bin/reduce-20080908-psl  /usr/local/bin/reduce-20120504-psl  /usr/local/bin/reduce-psl
    /usr/local/bin/reduce-20120504-csl  /usr/local/bin/reduce-csl
    % env DISPLAY= reduce
    Reduce (Free CSL version), 05-May-12 ...
    % reduce -w
    Reduce (Free CSL version), 05-May-12 ...

    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. Unsetting the DISPLAY, or supplying the -w option, suppresses the GUI, and uses the terminal window.

  5.   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;
    3: sin(-7.5);
     - 0.93799997677473885794846379814904723643183139550803
    4: sin(1/256) / (1/256);
    5: factorial(40);
  6.   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.

  7.   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:

    hat surface plot

    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.

  8.   I'm working on machine X. Why does it not have REDUCE?

    REDUCE is a highly portable system, but needs either Codemist Standard 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. In mid-2012, all but 3 of our 25 or so flavors of Unix systems have one or more versions of REDUCE installed.

  9.   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.

Dept Info Outreach College of Science Newsletter

Department of Mathematics
University of Utah
155 South 1400 East, JWB 233
Salt Lake City, Utah 84112-0090
Tel: 801 581 6851, Fax: 801 581 4148

Entire Web                     Only