IEEE Calculator in Pascal

David G Hough at validgh validgh
Wed Jun 16 08:23:19 PDT 1999


15 years ago I wrote a UCSD Pascal program to perform IEEE arithmetic for
the purpose of checking an IEEE arithmetic implementation at Apple.

People still very occasionally inquire about it, so I put it on my website
at http://www.validgh.com/software
There's Pascal source and an executable compiled for SPARC SunOS 4.0 in 1990
that still works on SunOS 5.6 (Solaris 2.6).

Here's the 1985 announcement:


     Now that there is an approved IEEE standard for  binary
floating  point arithmetic, persons interested in implement-
ing the standard may be interested to learn  of  a  software
implementation  of  the  standard  available  in  the public
domain.  This implementation, called  the  IEEE  calculator,
provides  a  way  to  test  your  implementation in progress
against a fairly complete implementation of the standard  as
it  was specified in 1980. The IEEE calculator allows one to
enter numbers in decimal or hex notation, perform any of the
operations specified by the standard, and view the numerical
results in decimal and hex as well as  the  exceptions  sig-
nalled.

     The IEEE calculator is written entirely in  Pascal  and
computes  results  a bit at a time.  Consequently the arith-
metic is too slow to use for any significant number of  cal-
culations  but is ideal for debugging new implementations by
providing a comparison for results and exceptions.

     As public domain software the IEEE calculator  is  com-
pletely  unsupported;  users  bear the entire responsibility
for determining its correctness for and applicability to any
specific  purpose.   The  program implements the standard as
specified in 1980, but most subsequent changes in the  stan-
dard are minor.









More information about the Numeric-interest mailing list