Yes, he does the Restoration..
Here is the final benchmark with Pascal-S, the most precise gadget I've found.
Code:
.R PASCAL
*
*BENPA.PA/G
P A S C A L - S COMPILER V02 HTL-MOEDLING
0 PROGRAM BENCH(OUTPUT);
0 (* REAL PROGRAMMERS DON'T USE PASCAL *)
0 CONST N = 500;
0 VAR X,Y: REAL;
0 I,J: INTEGER;
0 A: ARRAY[1..4,1..N] OF REAL;
0 BEGIN
0 WRITELN("START");
4 X := 0.01;
7 J := 2;
10 FOR I := 1 TO N DO
14 BEGIN
14 A[1,I] := X;
21 Y := SQRT(X);
25 A[J,I] := Y;
32 Y := SIN(X);
36 A[J+1,I] := Y;
45 Y := LN(X);
49 A[J+2,I] := Y;
58 X := X + 0.01;
63 END;
64
64 WRITELN("END");
68 WRITELN;
69 WRITELN(" # X SQRT SIN N-LOG");
73 FOR I := 1 TO 17 DO
77 BEGIN
77 WRITELN(I:3," ",A[1,I]:7:3," ",A[2,I]," ",A[3,I]," ",A[4,I]);
123 END;
124 END.
KOMPILATION EINWANDFREI!
START
END
# X SQRT SIN N-LOG
1 0.010 9.999999999E-002 9.999833334E-003 -4.605170185E+000
2 0.020 1.414213562E-001 1.999866669E-002 -3.912023005E+000
3 0.030 1.732050807E-001 2.999550020E-002 -3.506557897E+000
4 0.040 1.999999999E-001 3.998933418E-002 -3.218875824E+000
5 0.050 2.236067977E-001 4.997916927E-002 -2.995732273E+000
6 0.060 2.449489742E-001 5.996400647E-002 -2.813410716E+000
7 0.070 2.645751311E-001 6.994284733E-002 -2.659260037E+000
8 0.080 2.828427124E-001 7.991469396E-002 -2.525728644E+000
9 0.090 2.999999999E-001 8.987854919E-002 -2.407945608E+000
10 0.100 3.162277660E-001 9.983341664E-002 -2.302585093E+000
11 0.110 3.316624790E-001 1.097783008E-001 -2.207274913E+000
12 0.120 3.464101614E-001 1.197122072E-001 -2.120263536E+000
13 0.130 3.605551275E-001 1.296341426E-001 -2.040220828E+000
14 0.140 3.741657386E-001 1.395431146E-001 -1.966112856E+000
15 0.150 3.872983345E-001 1.494381324E-001 -1.897119985E+000
16 0.160 3.999999999E-001 1.593182065E-001 -1.832581463E+000
17 0.170 4.123105625E-001 1.691823490E-001 -1.771956842E+000
.
It does it in ~3.5secs. The original PDP-8/E did it in 44secs.
The precision is fantastic!!
Btw, it does 500 calcs, we print only first 17 out, here is the upper side
Code:
# X SQRT SIN N-LOG
490 4.900 2.213594351E+000 -9.824526215E-001 1.589235195E+000
491 4.910 2.215851970E+000 -9.805384071E-001 1.591273932E+000
492 4.920 2.218107290E+000 -9.785261398E-001 1.593308520E+000
493 4.930 2.220360320E+000 -9.764160207E-001 1.595338978E+000
494 4.940 2.222611066E+000 -9.742082608E-001 1.597365321E+000
495 4.950 2.224859535E+000 -9.719030809E-001 1.599387566E+000
496 4.960 2.227105734E+000 -9.695007114E-001 1.601405730E+000
497 4.970 2.229349670E+000 -9.670013927E-001 1.603419830E+000
498 4.980 2.231591349E+000 -9.644053747E-001 1.605429881E+000
499 4.990 2.233830779E+000 -9.617129170E-001 1.607435899E+000
500 5.000 2.236067966E+000 -9.589242888E-001 1.609437902E+000
I've checked out the Basic, Pascal and F4 at the upper ends, until it crashed (aprox):
Code:
Language FP Array Dim Words/FPnum (estim) Array in Ram (kW)
========================================================================================
Basic A(4, 1800) 3 21.6
Fortran IV A(4, 500) 3 6
Pascal-S A(4, 1000) 4 16
So only Fortran seems to be built for 8kW ram max..
The precision of Basic and Fortran is at the current level of 32bit single precision, except transcendentals, where they use a simple approximation only, so at the upper side ie. the sin(5) is 3 digits precise in Basic, 4 in F4 (ie. the sin() in Basic and F4 is defined in -0.2*2pi to 0.2*2pi only, afaik). Therefore are these two faster..
The Pascal-S is still 7digits precise with sin(5), thus it uses series imho. I've seen somewhere the Pascal-S uses 35bit mantissa. That would be something like "one and half precision" as CharlieS would say.
There are 4 and 5 words FP libs written in asm floating around on paper tapes. Interesting..