Floating point math in FORTRAN IV on PDP-8
Kyle Owen
kylevowen at gmail.com
Sun Sep 23 20:59:12 CDT 2018
On Sun, Sep 23, 2018 at 8:28 PM Rick Murphy via cctalk <
cctalk at classiccmp.org> wrote:
>
> That seems like you have a mixed-up F4 compiler/runtime.
> On my system (SIMH) I get the same results, FPP enabled or disabled.
> Don't know how to enable/disable EAE on SIMH, unfortunately.
>
> What you're getting means that the compiler, runtime, and libraries are
> not from the same release.
> -Rick
>
Hmm...I was using the exact same RK05 image in both SIMH and the real
machine.
I've been informed that "set cpu noeae" will disable the EAE.
Just tried it with that...and there's the problem. No FPP or EAE seems like
a bad combination for running FORTRAN IV code that does any bit of math
operations.
>From SIMH (with EAE and FPP disabled):
.R F4
*FLOAT/G$
1.000002 1.000002 0.000000
2.000002 1.000031 0.693147
3.000002 1.224747 1.098614
4.000002 2.000002 1.386296
5.000002 5.798176 1.609439
6.000002 4.015202 1.791761
7.000002 3.522211 1.837092
8.000001 2.000061 -1.920560
9.000002 2.121345 -1.802777
10.000008 2.236078 -1.697417
11.000007 2.345213 -2.130667
12.000012 2.449492 -1.515095
13.000011 2.549511 -1.141335
14.000010 3.331171 -1.469765
15.000009 3.338015 -1.037061
16.000008 4.000002 2.772591
17.000007 4.123107 2.833214
18.000012 4.242642 2.890373
19.000011 4.358900 2.967808
20.000010 11.596357 2.995733
21.000009 10.150188 3.122650
22.000008 9.188697 2.562484
23.000013 8.516458 2.604795
24.000012 8.030402 3.178056
25.000011 7.671024 3.206363
26.000010 7.401572 3.551816
27.000010 7.198119 3.612231
28.000015 7.044420 3.223386
29.000014 6.929063 1.967658
30.000013 6.843800 3.656090
31.000012 6.782515 3.713244
32.000011 4.000121 3.465738
[snip]
Maybe someday I'll delve into why it doesn't play nicely with such math
without EAE and FPP.
So, in summary, either EAE or FPP (or both) works fine. Without at least
one, don't count on any floating point math to be right (based on my
limited assessment).
Surely this must've been known about 40+ years ago...right?
Kyle
More information about the cctech
mailing list