Wilkinson Calculator

by Daniel D. Warner

The Wilkinson model of floating point arithmetic starts by defining the set of rational numbers which comprise the "model numbers". This set is defined in terms of four parameters: b, t, emin, and emax, where b is the base, t is the number of base b digits, emin is the minimum exponent, and emax is the maximum exponent. More precisely, the model contains 0 and all numbers of the form:
± (d1/b + d2/b^2 + . . . + dt/b^t) x b^e
where emin <= e <= emax.

There are three derived numbers which reflect key features of a particular model. These are: lambda (the largest positive model number), sigma (the smallest positve model number), and eps (the machine epsilon which is the largest relative gap between two model numbers). The last number, the machine epsilon, is the crucial parameter for analyzing rounding errors in floating point arithmetic. The machine epsilon has the property that 1 + eps > 1.

This page contains a Java implementation of a calculator for a large range of Wilkinson models. Specifically, the base can be any value between 2 and 2^15. The number of digits is limited only by the memory of the machine (and the patience of the user). The minimum and maximum exponents can be any valid 32-bit integer.

Specify different model parameters in the boxes below, and the display will show the key parameters as well as a few sample calculations. For bases between 2 and 36 there is a single digit representation (0 - 9 a - z) of a base b digit. For example, in base 16 a through f represent the digits 10 through 15. For bases larger than 36, each digit is represented as a base 10 number and each digit is separated by a space.


Specify the base:

Specify the number of digits:

Specify the minimum exponent:

Specify the maximum exponent:


The display above blends Java and JavaScript using Netscape's "Live Connect" technology. With this technology JavaScript can be used to access the public methods of any currently loaded Java applet. Here each of the four text inputs causes a call to the WilkinsonCaluculator which sets the Base, Digits, Emin, or Emax to the new value. The new parameters and the results of sample calculations are displayed in the applet's standard drawing area.

However, a public method can be included which returns information in a string. This can then be displayed by JavaScript in a TextArea. Click on the button below to see an example of this type of interaction.


Code and documentation developed by Daniel D. Warner
Please email questions and comments to warner@math.clemson.edu.
The author wishes to thank Clemson University and the Shodor Education Foundation for support of this project.