Hi Jeffrey,
Thank you for the excellent CP/M 2.2 simulator. The portable C flavor compiles cleanly with gcc 2.7.2.3, 2.95.3, and 3.3.6 under SVR4 4.0.4 (USL SVR4 Version 4.0 386 reference port). It also compiles cleanly with gcc 2.95.3 under SVR5 (UnixWare 7.1.1). I dual boot these operating systems on a Pentium III machine.
In all instances, PARANOIA.BAS reports identical defects. See below. Is this to be expected?
Kind regards,
--Paul
Diagnosis resumes after milestone #L = 40 , ... page 4
Checking for rounding in Multiply (R1), Divide (R2) and Add/Subtract (R3):
R1=1: Multiplication appears to be correctly rounded.
R2=1: Division appears to be correctly rounded.
Add/Subtract is neither chopped nor correctly rounded.
S=0: Sticky bit used incorrectly or not at all.
Does Multiplication commute? Testing if XY = YX for 20 random pairs:
********** No failure found in 20 randomly chosen pairs. **********
Running tests of Square Root SQR(X) :
Testing if SQR(X*X) = X for 20 integers X
DEFECT : SQR( 1089 ) - 33 = -3.8147E-06
instead of correct value 0 .
SQR has passed a test for Monotonicity.
Testing whether SQR is rounded or chopped:
Square Root is neither chopped nor correctly rounded.
Observed errors run from -6.5 to 1.39495 ulps.
SERIOUS DEFECT: SQR gets too many last digits wrong.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 90 , ... page 5
Testing powers Z^i for small integers Z and i :
DEFECT: Computed ( 2 )^( 13 ) = 8192.01
compares Unequal to correct 8192 ; they differ by 5.85938E-03
Error like this may invalidate financial calculations involving interest rates.
Similar discrepancies have occurred 55 times.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 100 , ... page 6
Seeking Underflow thresholds U0 and E0 :
Smallest strictly positive number found is E0 = 2.93874E-39
Since Comparison denies E0 = 0 , evaluating (E0+E0)/E0 should be safe;
what the machine gets for (E0+E0)/E0 is 2
This is O.K. provided Over/Underflow has NOT just been signaled.
DEFECT: What prints as E0 = 2.93874E-39 compares different from
E0/1 = 0
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 120 , ... page 7
FLAW: X = 8.08153E-39 is Unequal to Z = 5.87747E-39 ,
yet X-Z yields 0 . Should this NOT signal Underflow,
this is a SERIOUS DEFECT that causes confusion when innocent statements like
if (X=Z) then ... else ... ( f(X)-f(Z) )/(X-Z) ...
encounter Division by Zero although actually X/Z = 1 + .375
The Underflow threshold U0 is 5.87747E-39 , below which
calculation may suffer larger Relative error than merely roundoff.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 130 , ... page 8
Since Underflow occurs below the threshold U0 = ( 2 )^(-127 ) ,
only underflow should afflict the expression ( 2 )^(-254 ) ;
actually calculating it yields 0
This computed value is O.K.
Testing X^((X+1)/(X-1)) vs. exp(2) = 7.38906 as X -> 1.
DEFECT: Calculated (1 + (-5.96046E-08 ))^(-3.35544E+07 )
differs from correct value by 7.47781
This much error may spoil financial calculations involving tiny interest rates.
Testing powers Z^Q at four nearly extreme values:
... no discrepancies found.
To continue diagnosis, press ENTER [<-'] key:
Hi Jeffrey,
Thank you for the excellent CP/M 2.2 simulator. The portable C flavor compiles cleanly with gcc 2.7.2.3, 2.95.3, and 3.3.6 under SVR4 4.0.4 (USL SVR4 Version 4.0 386 reference port). It also compiles cleanly with gcc 2.95.3 under SVR5 (UnixWare 7.1.1). I dual boot these operating systems on a Pentium III machine.
In all instances, PARANOIA.BAS reports identical defects. See below. Is this to be expected?
Kind regards,
--Paul
Diagnosis resumes after milestone #L = 40 , ... page 4
Checking for rounding in Multiply (R1), Divide (R2) and Add/Subtract (R3):
R1=1: Multiplication appears to be correctly rounded.
R2=1: Division appears to be correctly rounded.
Add/Subtract is neither chopped nor correctly rounded.
S=0: Sticky bit used incorrectly or not at all.
Does Multiplication commute? Testing if XY = YX for 20 random pairs:
********** No failure found in 20 randomly chosen pairs. **********
Running tests of Square Root SQR(X) :
Testing if SQR(X*X) = X for 20 integers X
DEFECT : SQR( 1089 ) - 33 = -3.8147E-06
instead of correct value 0 .
SQR has passed a test for Monotonicity.
Testing whether SQR is rounded or chopped:
Square Root is neither chopped nor correctly rounded.
Observed errors run from -6.5 to 1.39495 ulps.
SERIOUS DEFECT: SQR gets too many last digits wrong.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 90 , ... page 5
Testing powers Z^i for small integers Z and i :
DEFECT: Computed ( 2 )^( 13 ) = 8192.01
compares Unequal to correct 8192 ; they differ by 5.85938E-03
Error like this may invalidate financial calculations involving interest rates.
Similar discrepancies have occurred 55 times.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 100 , ... page 6
Seeking Underflow thresholds U0 and E0 :
Smallest strictly positive number found is E0 = 2.93874E-39
Since Comparison denies E0 = 0 , evaluating (E0+E0)/E0 should be safe;
what the machine gets for (E0+E0)/E0 is 2
This is O.K. provided Over/Underflow has NOT just been signaled.
DEFECT: What prints as E0 = 2.93874E-39 compares different from
E0/1 = 0
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 120 , ... page 7
FLAW: X = 8.08153E-39 is Unequal to Z = 5.87747E-39 ,
yet X-Z yields 0 . Should this NOT signal Underflow,
this is a SERIOUS DEFECT that causes confusion when innocent statements like
if (X=Z) then ... else ... ( f(X)-f(Z) )/(X-Z) ...
encounter Division by Zero although actually X/Z = 1 + .375
The Underflow threshold U0 is 5.87747E-39 , below which
calculation may suffer larger Relative error than merely roundoff.
To continue diagnosis, press ENTER [<-'] key:
Diagnosis resumes after milestone #L = 130 , ... page 8
Since Underflow occurs below the threshold U0 = ( 2 )^(-127 ) ,
only underflow should afflict the expression ( 2 )^(-254 ) ;
actually calculating it yields 0
This computed value is O.K.
Testing X^((X+1)/(X-1)) vs. exp(2) = 7.38906 as X -> 1.
DEFECT: Calculated (1 + (-5.96046E-08 ))^(-3.35544E+07 )
differs from correct value by 7.47781
This much error may spoil financial calculations involving tiny interest rates.
Testing powers Z^Q at four nearly extreme values:
... no discrepancies found.
To continue diagnosis, press ENTER [<-'] key: