Calc

CRPC Line


Developers:
Hans-J. Boehm, Vernon Lee and Alan J. Demers

Abstract:
Calc is a desk calculator utility that operates on construc- tive real numbers. The underlying idea is to represent a real number as a function, to a level of accuracy specified by the user. The results displayed by the calculator are always accurate to the desired precision, no matter how they were derived. The expression ln((1+e**(-500))-1) correctly evaluates to -500.

Uses/Advantages:
The results displayed by the calculator are always accurate to the desired precision, no matter how they were derived. Performs demand-driven evaluation. It allows you to scroll through results, evaluating more digits as needed.

Version:
2.9

Catalog #:
PD95021

Platforms:
Sun Architecture

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

Files:
C_calc.tar.Z

Cost:
free

Contact:
boehm@xerox.com

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