<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
Jeff sent this to me and I wanted to make sure it got posted to<br>
the mailing list. paranoia reports flaws in the math.<br>
<br>
I don't know how this compares to the native gcc on the Linux<br>
distributed with the Edison.<br>
<div class="moz-forward-container"><br>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">*** BEGIN OF TEST PARANOIA ***<o:p></o:p></p>
<p class="MsoNormal">paranoia version 1.1 [cygnus]<o:p></o:p></p>
<p class="MsoNormal">Program is now RUNNING tests on small
integers:<o:p></o:p></p>
<p class="MsoNormal">TEST: 0+0 != 0, 1-1 != 0, 1 <= 0, or 1+1
!= 2<o:p></o:p></p>
<p class="MsoNormal">PASS: 0+0 != 0, 1-1 != 0, 1 <= 0, or 1+1
!= 2<o:p></o:p></p>
<p class="MsoNormal">TEST: 3 != 2+1, 4 != 3+1, 4+2*(-2) != 0, or
4-3-1 != 0<o:p></o:p></p>
<p class="MsoNormal">PASS: 3 != 2+1, 4 != 3+1, 4+2*(-2) != 0, or
4-3-1 != 0<o:p></o:p></p>
<p class="MsoNormal">TEST: -1+1 != 0, (-1)+abs(1) != 0, or
-1+(-1)*(-1) != 0<o:p></o:p></p>
<p class="MsoNormal">PASS: -1+1 != 0, (-1)+abs(1) != 0, or
-1+(-1)*(-1) != 0<o:p></o:p></p>
<p class="MsoNormal">TEST: 1/2 + (-1) + 1/2 != 0<o:p></o:p></p>
<p class="MsoNormal">PASS: 1/2 + (-1) + 1/2 != 0<o:p></o:p></p>
<p class="MsoNormal">TEST: 9 != 3*3, 27 != 9*3, 32 != 8*4, or
32-27-4-1 != 0<o:p></o:p></p>
<p class="MsoNormal">PASS: 9 != 3*3, 27 != 9*3, 32 != 8*4, or
32-27-4-1 != 0<o:p></o:p></p>
<p class="MsoNormal">TEST: 5 != 4+1, 240/3 != 80, 240/4 != 60,
or 240/5 != 48<o:p></o:p></p>
<p class="MsoNormal">PASS: 5 != 4+1, 240/3 != 80, 240/4 != 60,
or 240/5 != 48<o:p></o:p></p>
<p class="MsoNormal">-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 &
240 are O.K.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Searching for Radix and Precision.<o:p></o:p></p>
<p class="MsoNormal">Radix = 2.000000 .<o:p></o:p></p>
<p class="MsoNormal">Closest relative separation found is U1 =
5.4210109e-20 .<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Recalculating radix and precision<o:p></o:p></p>
<p class="MsoNormal"> confirms closest relative separation U1 .<o:p></o:p></p>
<p class="MsoNormal">Radix confirmed.<o:p></o:p></p>
<p class="MsoNormal">TEST: Radix is too big: roundoff problems<o:p></o:p></p>
<p class="MsoNormal">PASS: Radix is too big: roundoff problems<o:p></o:p></p>
<p class="MsoNormal">TEST: Radix is not as good as 2 or 10<o:p></o:p></p>
<p class="MsoNormal">PASS: Radix is not as good as 2 or 10<o:p></o:p></p>
<p class="MsoNormal">TEST: (1-U1)-1/2 < 1/2 is FALSE, prog.
fails?<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: FAILURE: (1-U1)-1/2 <
1/2 is FALSE, prog. fails?.<o:p></o:p></p>
<p class="MsoNormal">PASS: (1-U1)-1/2 < 1/2 is FALSE, prog.
fails?<o:p></o:p></p>
<p class="MsoNormal">TEST: Comparison is fuzzy,X=1 but X-1/2-1/2
!= 0<o:p></o:p></p>
<p class="MsoNormal">PASS: Comparison is fuzzy,X=1 but X-1/2-1/2
!= 0<o:p></o:p></p>
<p class="MsoNormal">The number of significant digits of the
Radix is 64.000000 .<o:p></o:p></p>
<p class="MsoNormal">TEST: Precision worse than 5 decimal
figures<o:p></o:p></p>
<p class="MsoNormal">PASS: Precision worse than 5 decimal
figures<o:p></o:p></p>
<p class="MsoNormal">TEST: Subtraction is not normalized X=Y,X+Z
!= Y+Z!<o:p></o:p></p>
<p class="MsoNormal">PASS: Subtraction is not normalized X=Y,X+Z
!= Y+Z!<o:p></o:p></p>
<p class="MsoNormal">Subtraction appears to be normalized, as it
should be.<o:p></o:p></p>
<p class="MsoNormal">Checking for guard digit in *, /, and -.<o:p></o:p></p>
<p class="MsoNormal">TEST: * gets too many final digits wrong.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PASS: * gets too many final digits wrong.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">TEST: Division lacks a Guard Digit, so
error can exceed 1 ulp<o:p></o:p></p>
<p class="MsoNormal">or 1/3 and 3/9 and 9/27 may disagree<o:p></o:p></p>
<p class="MsoNormal">PASS: Division lacks a Guard Digit, so
error can exceed 1 ulp<o:p></o:p></p>
<p class="MsoNormal">or 1/3 and 3/9 and 9/27 may disagree<o:p></o:p></p>
<p class="MsoNormal">TEST: Computed value of 1/1.000..1 >= 1<o:p></o:p></p>
<p class="MsoNormal">PASS: Computed value of 1/1.000..1 >= 1<o:p></o:p></p>
<p class="MsoNormal">TEST: * and/or / gets too many last digits
wrong<o:p></o:p></p>
<p class="MsoNormal">PASS: * and/or / gets too many last digits
wrong<o:p></o:p></p>
<p class="MsoNormal">TEST: - lacks Guard Digit, so cancellation
is obscured<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: SERIOUS DEFECT: - lacks
Guard Digit, so cancellation is obscured.<o:p></o:p></p>
<p class="MsoNormal">PASS: - lacks Guard Digit, so cancellation
is obscured<o:p></o:p></p>
<p class="MsoNormal">Checking rounding on multiply, divide and
add/subtract.<o:p></o:p></p>
<p class="MsoNormal">TEST: X * (1/X) differs from 1<o:p></o:p></p>
<p class="MsoNormal">PASS: X * (1/X) differs from 1<o:p></o:p></p>
<p class="MsoNormal">* is neither chopped nor correctly rounded.<o:p></o:p></p>
<p class="MsoNormal">/ is neither chopped nor correctly rounded.<o:p></o:p></p>
<p class="MsoNormal">TEST: Radix * ( 1 / Radix ) differs from 1<o:p></o:p></p>
<p class="MsoNormal">PASS: Radix * ( 1 / Radix ) differs from 1<o:p></o:p></p>
<p class="MsoNormal">TEST: Incomplete carry-propagation in
Addition<o:p></o:p></p>
<p class="MsoNormal">PASS: Incomplete carry-propagation in
Addition<o:p></o:p></p>
<p class="MsoNormal">Addition/Subtraction neither rounds nor
chops.<o:p></o:p></p>
<p class="MsoNormal">Sticky bit used incorrectly or not at all.<o:p></o:p></p>
<p class="MsoNormal">TEST: lack(s) of guard digits or failure(s)
to correctly round or chop<o:p></o:p></p>
<p class="MsoNormal">(noted above) count as one flaw in the
final tally below<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: FLAW: lack(s) of guard
digits or failure(s) to correctly round or chop<o:p></o:p></p>
<p class="MsoNormal">(noted above) count as one flaw in the
final tally below.<o:p></o:p></p>
<p class="MsoNormal">PASS: lack(s) of guard digits or failure(s)
to correctly round or chop<o:p></o:p></p>
<p class="MsoNormal">(noted above) count as one flaw in the
final tally below<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does Multiplication commute? Testing on 20
random pairs.<o:p></o:p></p>
<p class="MsoNormal"> No failures found in 20 integer pairs.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Running test of square root(x).<o:p></o:p></p>
<p class="MsoNormal">TEST: Square root of 0.0, -0.0 or 1.0 wrong<o:p></o:p></p>
<p class="MsoNormal">PASS: Square root of 0.0, -0.0 or 1.0 wrong<o:p></o:p></p>
<p class="MsoNormal">Testing if sqrt(X * X) == X for 20 Integers
X.<o:p></o:p></p>
<p class="MsoNormal">Test for sqrt monotonicity.<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: DEFECT: sqrt(X) is
non-monotonic for X near 2.0000000e+00 .<o:p></o:p></p>
<p class="MsoNormal">Testing whether sqrt is rounded or chopped.<o:p></o:p></p>
<p class="MsoNormal">Square root is neither chopped nor
correctly rounded.<o:p></o:p></p>
<p class="MsoNormal">Observed errors run from -5.5000000e+00 to
5.0000000e-01 ulps.<o:p></o:p></p>
<p class="MsoNormal">TEST: sqrt gets too many last digits wrong<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: SERIOUS DEFECT: sqrt gets
too many last digits wrong.<o:p></o:p></p>
<p class="MsoNormal">PASS: sqrt gets too many last digits wrong<o:p></o:p></p>
<p class="MsoNormal">Testing powers Z^i for small Integers Z and
i.<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: DEFECT: computing<o:p></o:p></p>
<p class="MsoNormal"> (1.30000000000000000e+01) ^
(1.70000000000000000e+01)<o:p></o:p></p>
<p class="MsoNormal"> yielded 8.65041591938133811e+18;<o:p></o:p></p>
<p class="MsoNormal"> which compared unequal to correct
8.65041591938133914e+18 ;<o:p></o:p></p>
<p class="MsoNormal"> they differ by
-1.02400000000000000e+03 .<o:p></o:p></p>
<p class="MsoNormal">Errors like this may invalidate financial
calculations<o:p></o:p></p>
<p class="MsoNormal"> involving interest rates.<o:p></o:p></p>
<p class="MsoNormal">Similar discrepancies have occurred 5
times.<o:p></o:p></p>
<p class="MsoNormal">Seeking Underflow thresholds UfThold and
E0.<o:p></o:p></p>
<p class="MsoNormal">Smallest strictly positive number found is
E0 = 0 .<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: FAILURE: Either accuracy
deteriorates as numbers<o:p></o:p></p>
<p class="MsoNormal">approach a threshold =
0.00000000000000000e+00<o:p></o:p></p>
<p class="MsoNormal"> coming down from 0.00000000000000000e+00<o:p></o:p></p>
<p class="MsoNormal"> or else multiplication gets too many last
digits wrong.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The Underflow threshold is
0.00000000000000000e+00, below which<o:p></o:p></p>
<p class="MsoNormal">calculation may suffer larger Relative
error than merely roundoff.<o:p></o:p></p>
<p class="MsoNormal">Since underflow occurs below the threshold<o:p></o:p></p>
<p class="MsoNormal">UfThold = (2.00000000000000000e+00) ^
(-inf)<o:p></o:p></p>
<p class="MsoNormal">only underflow should afflict the
expression<o:p></o:p></p>
<p class="MsoNormal"> (2.00000000000000000e+00) ^ (-inf);<o:p></o:p></p>
<p class="MsoNormal">actually calculating yields:
0.00000000000000000e+00 .<o:p></o:p></p>
<p class="MsoNormal">This computed value is O.K.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Testing X^((X + 1) / (X - 1)) vs. exp(2) =
7.38905609893065041e+00 as X -> 1.<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: DEFECT: Calculated
1.00000000000000000e+00 for<o:p></o:p></p>
<p class="MsoNormal"> (1 + (0.00000000000000000e+00) ^
(inf);<o:p></o:p></p>
<p class="MsoNormal"> differs from correct value by
-6.38905609893065041e+00 .<o:p></o:p></p>
<p class="MsoNormal"> This much error may spoil financial<o:p></o:p></p>
<p class="MsoNormal"> calculations involving tiny
interest rates.<o:p></o:p></p>
<p class="MsoNormal">Testing powers Z^Q at four nearly extreme
values.<o:p></o:p></p>
<p class="MsoNormal"> ... no discrepancies found.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Searching for Overflow threshold:<o:p></o:p></p>
<p class="MsoNormal">This may generate an error.<o:p></o:p></p>
<p class="MsoNormal">Can `Z = -Y' overflow?<o:p></o:p></p>
<p class="MsoNormal">Trying it on Y = -inf .<o:p></o:p></p>
<p class="MsoNormal">finds a ERROR: Severity: FLAW: -(-Y)
differs from Y.<o:p></o:p></p>
<p class="MsoNormal">Overflow threshold is V = -inf .<o:p></o:p></p>
<p class="MsoNormal">Overflow saturates at V0 = inf .<o:p></o:p></p>
<p class="MsoNormal">No Overflow should be signaled for V * 1 =
-inf<o:p></o:p></p>
<p class="MsoNormal"> nor for V / 1 =
-inf .<o:p></o:p></p>
<p class="MsoNormal">Any overflow signal separating this * from
the one<o:p></o:p></p>
<p class="MsoNormal">above is a DEFECT.<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: FAILURE: Comparisons
involving +--inf, +-inf<o:p></o:p></p>
<p class="MsoNormal">and +-0 are confused by Overflow.<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: SERIOUS DEFECT: X / X
differs from 1 when X = -inf<o:p></o:p></p>
<p class="MsoNormal"> instead, X / X - 1/2 - 1/2 = nan .<o:p></o:p></p>
<p class="MsoNormal">ERROR: Severity: SERIOUS DEFECT: X / X
differs from 1 when X = 0.00000000000000000e+00<o:p></o:p></p>
<p class="MsoNormal"> instead, X / X - 1/2 - 1/2 = nan .<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What message and/or values does Division by
Zero produce?<o:p></o:p></p>
<p class="MsoNormal"> Trying to compute 1 / 0 produces ...
inf .<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Trying to compute 0 / 0 produces ...
nan .<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The number of FAILUREs encountered
= 3.<o:p></o:p></p>
<p class="MsoNormal">The number of SERIOUS DEFECTs discovered
= 4.<o:p></o:p></p>
<p class="MsoNormal">The number of DEFECTs discovered
= 3.<o:p></o:p></p>
<p class="MsoNormal">The number of FLAWs discovered
= 2.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The arithmetic diagnosed has unacceptable
Serious Defects.<o:p></o:p></p>
<p class="MsoNormal">Potentially fatal FAILURE may have spoiled
this program's subsequent diagnoses.<o:p></o:p></p>
<p class="MsoNormal">END OF TEST.<o:p></o:p></p>
<p class="MsoNormal">*** END OF TEST PARANOIA ***<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">EXECUTIVE SHUTDOWN! Any key to reboot...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
</div>
<br>
</body>
</html>