
Copyright 1988, 1989 Hans-J. Boehm, Vernon Lee, Alan J. Demers
Copyright Digital Equipment Corporation & INRIA 1988, 1989
Copyright (c) 1990, 1991 by Xerox Corporation.  All rights reserved.

THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.

Permission is hereby granted to copy this compiler for any non-commercial
purpose, provided the above notices are retained on all copies.  Further
restrictions apply to the DEC/INRIA BigNum package.  These are stated in
the file runtime/BigNum/doc/bnbody.tex.

This work uses the BigNum package developed jointly by INRIA and
Digital PRL.    It has been modified by Hans-J. Boehm in August 1990
at Xerox PARC.  When you receive this software, please send mail to
librarian@prl.dec.com to inform them that you have a copy of the
package.

THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.

-----------------------------------

  This is version 2.1 of a desk calculator utility that operates on
constructive real numbers.  The file "calc.man" contains a manual page.

  The underlying idea is to represent a real number as a
function from a precisions specification to an approximation accurate to
the indicated precision.  For efficiency reasons, these functions "remember"
the best known approximation to a number.  More details on the ideas
underlying the implementation can be found in:

Hans-J. Boehm, "Constructive Real Interpretation of Numerical Programs",
Proceedings of the SIGPLAN '87 Symposium on Interpreters and Interpretive
Techniques, SIGPLAN Notices 22, 7 (July 1987), pp. 241-221.

Hans-J. Boehm, R. Cartwright, Michael J. O'Donnell, and Mark Riggle,
"Exact Real Arithmetic: A Case Study in Higher Order Programming",
Proceedings of the 1986 Lisp and Functional Programming Conference,
pp. 162-173.

The implementation makes use of some of the algorithms used in Brent's
multiple precision package.  These are described in:

Brent, R.P., "Fast Multiple-Precision Evaluation of Elementary Functions",
Journal of the ACM 23, (1976), pp. 242-251.

  The underlying constructive real package, as well as the desk calculator
interface to it, are written in the programming language Russell.  A Russell
compiler along with source for the constructive reals package is available
by ftp from arisia.xerox.com.  If you are interested, please send mail to
boehm@xerox.com.

  This distribution contains C source for the Russell run-time system,
C source for some small routines specific to the calculator, and
C code for the calculator itself.  The latter was automatically generated
from the Russell code, and is not human readable.  If you have need for
the Russell source, send mail to boehm@xerox.com.

  The code included here is at best semi-portable.  See the INSTALLATION
file for installation instructions.  The calculator has been run as is
on Sun 3s, Sun 4s, and Vaxen (under BSD UN*X).  It has been run with
minor modifications to Makefiles on a MIPS M/120 and on an IBM RS/6000.
(We also have a Sun 3 binary distribution, which is more compact, and
somewhat easier to install.)

  Performance on various machines may not be what you expect.  Sun 4s
do worse than Sun 3s on huge computations, since we do not have an assembly
language implementation of large integer arithmetic for Sun 4s.  (Rumor
has it that the instruction set would get in the way even if we did.) The MIPS
machine suffers from the lack of a reasonable unsigned integer divide
instruction.  (32 by 32 bit divide doesn't cut it here.) However, this version
of the caculator is tuned to avoid division in favor of Newton iteration
reciprocals, so it still does better than Sun 3s.  Vaxen should also do well.

  The file "calc_icon" is a sunview icon that suitable for use as an
iconic representation with the calculator.  Under sunview, it is reasonable
to add the following line to .rootmenu:

calc /usr/bin/shelltool -Ww 60 -Wh 23 ?/calc -Wl "calculator"
					     -WI ?/calc_icon -WL ""



Authors: Hans-J. Boehm  &  Vernon Lee
	 boehm@xerox.com    scorpion@rice.edu

  The garbage collector and BigNum components were developed by different 
groups, as described in those subdirectories.

  This work was supported in part by NSF grants MCS81-21844, DCR-8607200,
DCR84-03530, by DARPA/NSF grant CCR 87-20277, and by IBM corporation.
Some of the work was done at Xerox by the first author.