PARANOIA
Kahan's Floating Point Test Program
PARANOIA
is a FORTRAN77 program which
checks properties of a computer's arithmetic.
PARANOIA is a version of a program,
originally written in BASIC (!) by Professor W M Kahan, 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.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
PARANOIA is available in
a C version and
a FORTRAN77 version and
a FORTRAN90 version.
Related Data and Programs:
MACHAR,
a FORTRAN77 library which
computes the appropriate values of machine constants for a given machine.
MACHINE,
a FORTRAN77 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:
Examples and Tests:
List of Routines:
-
PARANOIA investigates floating point arithmetic.
-
COMMUTE tests for commutative multiplication.
-
RANDOM computes a "somewhat" randomized number.
-
EXTRA tests for extra precision in subexpressions.
-
GUARD checks for guard digits and normalization in subtraction.
-
INTRO prints the introduction.
-
LOGIT writes information to a checkpoint file.
-
CMPXY compares X and Y=Z**Q for equality.
-
PRT2 prints N, and pauses if N > 0.
-
PWRCMP compares Z**I with Z*Z*...*Z.
-
PRTCNT prints the number of discrepancies.
-
BADSQR reports on errors involving square of the square root.
-
OVERF tests overflow threshholds.
-
PAGE waits for the user to press RETURN.
-
PARTUF tests for partial underflow.
-
POWER tests the calculation of Y**X.
-
RADX finds the radix and precision.
-
ROUND tests rounding in multiplication, division, addition and subtraction.
-
SMLINT performs tests on small integers.
-
SQUARE tests the square root function.
-
SQERR asseses error in SQRT ( X * X ) - X.
-
NEWD updates D and Z.
-
SQRTDX tests the SQRT function.
-
UNDERF tests underflow threshholds.
-
ZEROS investigates division by zero.
-
BADMIL reports on unrecognizable milestones.
-
IDINT converts a double precision value to an integer.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 19 November 2008.