Constructive Reals Calculator

A newer, somewhat experimental, version of this calculator can be found here.

This is a slightly modified version of the constructive reals calculator developed by Hans-J. Boehm at SGI. The copyright belongs to SGI. Since it appears to no longer be available on the SGI site, it was rehosted here, as allowed by its license.

Overview

This is a calculator that operates on constructive real numbers. Numbers are represented exactly internally to the calculator, and then evaluated on demand to guarantee an error in the displayed result that is strictly less than one in the least significant displayed digit. It is possible to scroll the display to the right to generate essentially arbitrary precision in the result.

The calculator uses reverse Polish notation. To add 1 and 2, either click <1><enter><2><+> on the calculator keypad, or click on the display, so that it receives keyboard input, and type 1<space>2+ on the keyboard. For more detailed instructions, click here.

Examples

Try ePI · sqrt(163), entered as 163 <sqrt> <pi> <*> <exp> .

To demonstrate the effect of demand-driven evaluation, try

123 <+/-> <exp> <pi> <+> <ln> <exp> <pi> <-> <ln>.

or

10 <enter> 25 <^> <atan> <tan>

Library Interface

The calculator is implemented on top of a Java library that implements constructive real arithmetic. The library will live in com.sgi.math. It provides two interesting classes:

CR provides constructive reals as a subclass of Number. Its interface is described here.

UnaryCRFunction provides some limited operations on unary functions over the constructive reals. It also provides a large number of constants for commonly used functions. Its interface is described here.

Some general information on the implementation is here.

The entire calculator can be downloaded as a compressed tar file here.

Copyright

The calculator and library code is copyrighted by Silicon Graphics, Inc. It may be used and redistributed subject to conditions specified here and in the source files.

Contact

Please send bug reports, comments, or questions to Hans_Boehm@hp.com. Hans Boehm's home page.