Overview

Floating Point Utilities

The following utilities have been developed here during the course of investigating floating point arithmetic issues in agent based models. Unfortunately documentation is limited to comments in the code for the most part.

  • An Interval class for use with Swarm. This allows you to use machine interval arithmetic to check whether accumulated floating point rounding errors could be causing your code to behave in a way that is not in strict accordance with the model design.
  • A series of classes written in Objective C that allow you to compare different approaches to managing floating point arithmetic errors. (DoubleSimple)
  • An implementation of some of the functions in ieeefp.h for use with Cygwin on an Intel platform. The version of Cygwin supplied with Swarm 2.1.1 on the CD does not implement functions like fpgetsticky(), which allows you to check for floating point errors and fpsetround() which allows you to change the default rounding direction. The latter is essential for the Interval class. (The same applies to later versions of Cygwin, and to some flavours of Linux.)
  • Some simple tools for investigating floating point numbers: fp_hacker, which lets you explore the internal representation of floating point numbers (not available for Cygwin); and fp_bias, which lets you explore biases in floating point operations.

These tools are released under the GNU General Public Licence, with the exception of CIieeefp, which is released under the GNU Lesser General Public Licence. Clicking any of the source download links will be taken as an assertion that you agree to abide by the terms of the corresponding licence.

They are known to work on a Sun machine running Solaris 2.8, and, where available, on an Intel Pentium PC with Cygwin installed.

PackageUnix/non-Intel CygwinIntel CygwinDocumentation
Intervaldownload Download CIieeefp-3.0 as well, and replace ieeefp.h with CIieeefp.h None currently available
DoubleSimpledownload Download CIieeefp-3.0 as well, and replace ieeefp.h with CIieeefp.h. Some of the classes do not require this header file at all, however None currently available
CIieeefp

Not necessary / Not available

(If not available, CIieeefp-3.0 may work on some flavours of Linux.)

download view README
Investigative toolsdownloadUse the Sun versionNone currently available

We'd appreciate it if you would also be prepared to fill out the form below, letting us know of your interest in these packages, though you are not obliged to do so. It does help to justify this aspect of our work, however. We will not pass the information on to anyone else.

Name
Organisation
E-mail
Software downloaded  Interval 1.0  DoubleSimple 1.0  CIieeefp 3.0  fp 1.0
Comments
By clicking the "Send" button you give us permission to store the data you have entered on this form.