Type any character to start the program. Lest this program stop prematurely, i.e. before displaying "END OF TEST", try to persuade the computer NOT to terminate execution whenever an error like Over/Underflow or Division by Zero occurs, but rather to persevere with a surrogate value after, perhaps, displaying some warning. If persuasion avails naught, don't despair but run this program anyway to see how many milestones it passes, and then amend it to make further progress. Answer questions with Y, y, N or n (unless otherwise indicated). To continue, press any key and newline: Diagnosis resumes after milestone no 0 Page: 0 Users are invited to help debug and augment this program so it will cope with unanticipated and newly uncovered arithmetic pathologies. Please send suggestions and interesting results to Richard Karpinski Computer Center U-76 University of California San Francisco, CA 94143-0704, USA In doing so, please include the following information: Version: 10 February 1989 Computer: Compiler: Optimization level: Other relevant compiler options: To continue, press any key and newline: Diagnosis resumes after milestone no 1 Page: 1 Running this program should reveal these characteristics Radix = 1, 2, 4, 8, 10, 16, 100, 256, or ... Precision = number of significant digits carried. U2 = Radix/Radix^Precision = One Ulp (OneUlpnit in the Last Place) of 1.000xxx . U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 . Adequacy of guard digits for Mult., Div., and Subt. Whether arithmetic is chopped, correctly rounded, or something else for Mult., Div., Add/Subt. and Sqrt. Whether a Sticky Bit is used correctly for rounding. UnderflowThreshold = an Underflow Threshold. E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy. V = an overflow threshold, roughly. V0 tells, roughly, whether Infinity is represented. Comparisions are checked for consistency with subtraction and for contamination with pseudo-zeros. Sqrt is tested. Y^X is not tested. Extra-precise subexpressions are revealed but NOT YET tested. Decimal-Binary conversion is NOT YET tested for accuracy. To continue, press any key and newline: Diagnosis resumes after milestone no 2 Page: 2 The program attempts to discriminate among FLAWs, like lack of a sticky bit, SERIOUS DEFECTs, like lack of a guard digit, and FAILUREs, like 2+2 = 5 . Failures may confound subsequent diagnoses. The diagnostic capabilities of this program go beyond an earlier program called "MACHAR", which can be found at the end of the book "Software Manual for the Elementary Functions" (1980) by W. J. Cody and W. Waite. Although both programs try to discover the Radix, Precision and range (over/underflow thresholds) of the arithmetic, this program tries to cope with a wider variety of pathologies, and to say how well the arithmetic is implemented. BASIC version of this program (C) 1983 by Professor W. M. Kahan; see source comments for more history. The program is based upon a conventional radix representation for floating-point numbers, but also allows logarithmic encoding as used by certain early WANG machines. To continue, press any key and newline:

Tue Aug 8 13:05:00 GMT+0200 1995