PARANOIA
Kahan's Floating Point Test Program
PARANOIA
is a FORTRAN90 program which
checks properties of a computer's arithmetic,
by William Kahan.
PARANOIA is a FORTRAN90
version of the PARANOIA program,
originally written in BASIC (!), which
tests the properties of the floating point arithmetic used on
a computer. It is a more ambitious test than that carried out by
MACHAR.
The original, true, correct version of PARANOIA
is available in the PARANOIA subdirectory of
the NETLIB web site.
The version displayed here has been converted to FORTRAN90,
and other internal changes have been made to suit me.
Languages:
PARANOIA is available in
a C version and
a FORTRAN90 version.
Related Data and Programs:
MACHAR,
a FORTRAN90 library which
computes the appropriate values of machine constants for a given machine.
MACHINE,
a FORTRAN90 library which
store the appropriate values of machine constants for a given machine.
Reference:
-
Richard Karpinski,
Paranoia: A floating-point benchmark,
Byte Magazine,
Volume 10, Number 2, February 1985, pages 223-235.
Source Code:
-
paranoia.f90, the FORTRAN 90
single precision source code;
-
paranoia.sh,
commands to compile and load the FORTRAN 90
single precision source code;
Examples and Tests:
List of Routines:
-
PARANOIA investigates floating point arithmetic.
-
BADSQR reports on errors involving square of the square root.
-
CHECK_READ reads information from a checkpoint file for restarting.
-
CHECK_WRITE writes information to a checkpoint file for restarting.
-
CMPXY compares X and Y=Z**Q for equality.
-
COMMUTE tests for commutative multiplication.
-
EXTRA tests for extra precision in subexpressions.
-
GUARD checks for guard digits and normalization in subtraction.
-
INTRO prints the introduction.
-
NEWD updates D and Z.
-
OVERFLOW tests overflow threshholds.
-
PARTUF tests for partial underflow.
-
POWER tests the calculation of Y**X.
-
POWER_COMP compares Z**I with Z*Z*...*Z.
-
RADX finds the radix and the precision.
-
RANDOM computes a "somewhat" randomized number.
-
ROUND tests rounding in multiplication, division, addition and subtraction.
-
SMALL_INT carries out tests on small integers.
-
SQRERR assesses error in SQRT ( X * X ) - X.
-
SQRTDX tests the SQRT function.
-
SQUARE tests the square root function.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
UNDERFLOW tests underflow threshholds.
-
ZEROS investigates division by zero.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 20 October 2007.