COMMENT: ========================================= COMMENT: Welcome to ESP - Embedded System Paranoia COMMENT: Please let me know your experiences COMMENT: and suggestions at lesh@oakcomp.co.uk or COMMENT: L.Hatton@kent.ac.uk COMMENT: COMMENT: $Revision: 1.9 $ $Date: 2004/04/13 14:21:53 $ COMMENT: This version will attempt divide by zero. COMMENT: This version uses COMMENT: This version uses COMMENT: This version uses double precision. nbits=64 COMMENT: ========================================= -------> Diagnosis resuming after Milestone 0, Page 1 COMMENT: -1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 PASSED : small integer tests are all OK. COMMENT: Searching for Radix and Precision. COMMENT: Radix = 2.00000000000000000e+00 COMMENT: Closest relative separation found is U1 = 1.11022302462515654e-16 COMMENT: Recalculating radix and precision COMMENT: confirms closest relative separation U1. COMMENT: Checking U1 for sanity... COMMENT: U1 is a sensible value COMMENT: Radix confirmed. -------> Diagnosis resuming after Milestone 10, Page 2 -------> Diagnosis resuming after Milestone 20, Page 3 COMMENT: The number of significant digits of the COMMENT: Radix is 5.29999999999999982e+01 -------> Diagnosis resuming after Milestone 25, Page 4 -------> Diagnosis resuming after Milestone 30, Page 5 COMMENT: Subtraction appears to be normalized, as it should be. COMMENT: Checking for guard digit in *, / and -. PASSED : *, /, and - appear to have guard digits, as they should. -------> Diagnosis resuming after Milestone 35, Page 6 COMMENT: Checking rounding on multiply, divide and add/subtract. FLAW : Multiplication neither chopped nor correctly rounded. -------> Diagnosis resuming after Milestone 40, Page 7 FLAW : Division neither chopped nor correctly rounded. -------> Diagnosis resuming after Milestone 45, Page 8 COMMENT: Addition/Subtraction neither rounds nor chops. COMMENT: Sticky bit used incorrectly or not at all. FLAW : Flaws are present due to lack of guard digits or round/chop failures -------> Diagnosis resuming after Milestone 50, Page 9 COMMENT: Testing multiplicative commutation COMMENT: with random pairs, trials = 20 PASSED : No failures found during these trials. -------> Diagnosis resuming after Milestone 60, Page 10 COMMENT: Running test of exp(log)). COMMENT: random X, (exp(log(x)) - x) trials = 20 -------> Diagnosis resuming after Milestone 64, Page 11 COMMENT: Running test of difference of two squares). COMMENT: integer X, (X**2-Y**2) - (X-Y)(X+Y) trials = 20 -------> Diagnosis resuming after Milestone 65, Page 12 COMMENT: Running transcendental test 1. COMMENT: random X, (sin(X)**2+cos(X)**2) - 1.0 trials = 20 -------> Diagnosis resuming after Milestone 66, Page 13 COMMENT: Running transcendental test 2. COMMENT: random X, sin(4X) identity trials = 20 -------> Diagnosis resuming after Milestone 67, Page 14 COMMENT: Running hyperbolic test 1. COMMENT: random X, (cosh(X)**2-sinh(X)**2) - 1.0 trials = 20 -------> Diagnosis resuming after Milestone 68, Page 15 COMMENT: Running test of square root(x). COMMENT: Testing integer X, sqrt(X * X) = X, trials = 20 COMMENT: Test for sqrt monotonicity. PASSED : sqrt has passed a test for Monotonicity. -------> Diagnosis resuming after Milestone 70, Page 16 -------> Diagnosis resuming after Milestone 80, Page 17 COMMENT: Testing whether sqrt is rounded or chopped. FLAW : Square root is neither chopped nor correctly rounded. COMMENT: Observed errors run from COMMENT: 0.00000000000000000e+00 to 5.00000000000000000e-01 ulps. -------> Diagnosis resuming after Milestone 85, Page 18 -------> Diagnosis resuming after Milestone 90, Page 19 COMMENT: Testing powers Z^i for small Integers Z and i. -------> Diagnosis resuming after Milestone 91, Page 20 PASSED : ... no discrepancies found. -------> Diagnosis resuming after Milestone 100, Page 21 COMMENT: Seeking Underflow thresholds UfThold and E0. -------> Diagnosis resuming after Milestone 110, Page 22 COMMENT: Smallest strictly positive number found COMMENT: is E0 = 2.22507385850721384e-308 COMMENT: Since comparison denies Z = 0, evaluating COMMENT: (Z + Z) / Z should be safe. COMMENT: (Z+Z)/Z is OK provided Over/Underflow COMMENT: has NOT just been signaled. -------> Diagnosis resuming after Milestone 120, Page 23 FLAW : COMMENT: X != Z but X - Z = Zero COMMENT: X = 3.05947655544741171e-308, Z = 2.22507385850721384e-308 COMMENT: This is OK only if underflow signalled. COMMENT: X / Z = 1 + 3.75000000000000000e-01 COMMENT: The Underflow threshold is 2.22507385850721384e-308 COMMENT: Below this, a calculation may suffer larger Relative COMMENT: error than merely roundoff. -------> Diagnosis resuming after Milestone 121, Page 24 COMMENT: Since underflow occurs below the threshold COMMENT: UfThold = 2.00000000000000000e+00 ^ -1.02200000000000002e+03 COMMENT: only underflow could affect this expression. COMMENT: calculating yields: 0.00000000000000000e+00 PASSED : This computed value is O.K. -------> Diagnosis resuming after Milestone 130, Page 25 COMMENT: As X -> 1, Testing X^((X + 1) / (X - 1)) against exp(2). COMMENT: exp(2) = 7.38905609893065218e+00 PASSED : Accuracy seems adequate. -------> Diagnosis resuming after Milestone 140, Page 26 COMMENT: Testing powers Z^Q at four nearly extreme values. PASSED : ... no discrepancies found. -------> Diagnosis resuming after Milestone 150, Page 27 -------> Diagnosis resuming after Milestone 160, Page 28 COMMENT: Searching for Overflow threshold: COMMENT: This may generate an error. COMMENT: Can `Z = -Y' overflow? COMMENT: Trying it on Y = -inf PASSED : Seems O.K. COMMENT: Overflow threshold is V = 1.79769313486231646e+308 COMMENT: Overflow saturates at V0 = +inf COMMENT: No overflow should be signalled for V*1 = 1.79769313486231646e+308 COMMENT: No overflow should be signalled for V/1 = 1.79769313486231646e+308 COMMENT: Any overflow separating V*1 from COMMENT: V above is a DEFECT. -------> Diagnosis resuming after Milestone 161, Page 29 -------> Diagnosis resuming after Milestone 170, Page 30 -------> Diagnosis resuming after Milestone 175, Page 31 -------> Diagnosis resuming after Milestone 180, Page 32 -------> Diagnosis resuming after Milestone 190, Page 33 -------> Diagnosis resuming after Milestone 191, Page 34 -------> Diagnosis resuming after Milestone 200, Page 35 COMMENT: Trying to compute 1/0 gives +inf COMMENT: Trying to compute 0/0 gives nan -------> Diagnosis resuming after Milestone 210, Page 36 COMMENT: ========================================= COMMENT: Embedded System Paranoia SUMMARY COMMENT: DOUBLE PRECISION 64 bits COMMENT: Closest separation = 1.11022302462515654e-16 COMMENT: COMMENT: Number of FAILUREs encountered = 0 COMMENT: Number of SERIOUS DEFECTs discovered = 0 COMMENT: Number of DEFECTs discovered = 0 COMMENT: Number of FLAWs discovered = 5 COMMENT: PASSED : The arithmetic diagnosed seems satisfactory COMMENT: though flawed. COMMENT: COMMENT: Rating ... COMMENT: COMMENT: Excellent COMMENT: Very good COMMENT: =====> Good COMMENT: Acceptable COMMENT: Unacceptable COMMENT: Broken COMMENT: COMMENT: ----------------------------------------- COMMENT: MATHS LIBRARY TESTS COMMENT: (should all give zero) COMMENT: COMMENT: Basic identities COMMENT: ln(1.0) = COMMENT: 0.00000000000000000e+00 COMMENT: exp(0.0) - 2.718281828459045235360287 = COMMENT: 0.00000000000000000e+00 COMMENT: Basic tests (Random over range 0<=X<=1) COMMENT: Test, exp(log(X)) - X = COMMENT: -2.22044604925031308e-16 -> 1.11022302462515654e-16 COMMENT: COMMENT: Transcendental identities COMMENT: Test, sin(1.0) - 0.84147098480789650665250 = COMMENT: -1.11022302462515654e-16 COMMENT: Test, cos(1.0) - 0.54030230586813971740094 = COMMENT: 0.00000000000000000e+00 COMMENT: Test, asin(1.0) - (pi/2) = COMMENT: 0.00000000000000000e+00 COMMENT: Test, acos(0.0) - (pi/2) = COMMENT: 0.00000000000000000e+00 COMMENT: Test, atan(1.0) - (pi/4) = COMMENT: 1.11022302462515654e-16 COMMENT: Transcendental tests (Random over range 0<=X<=1) COMMENT: Test, sin**2(X)+cos**2(X)-1.0 = COMMENT: -2.22044604925031308e-16 -> 2.22044604925031308e-16 COMMENT: Test, sin(4X)-(8.0*cos**4(X)*tan(X))+(4.0*cos(X)*sin(X)) = COMMENT: -8.88178419700125232e-16 -> 1.11022302462515654e-15 COMMENT: COMMENT: Hyperbolic identities COMMENT: Test, sinh(0.0) = COMMENT: 0.00000000000000000e+00 COMMENT: Test, cosh(0.0) - 1.0 = COMMENT: 0.00000000000000000e+00 COMMENT: Hyperbolic tests (Random over range 0<=X<=1) COMMENT: Test, cosh**2(X)-sinh**2(X)-1.0 = COMMENT: -3.33066907387546962e-16 -> 4.44089209850062616e-16 COMMENT: COMMENT: END OF TEST. COMMENT: =========================================