Non-random numbers (SIMH PDP-8)?

Jim Battle frustum at pacbell.net
Wed Jan 11 16:02:32 CST 2006


Eric J Korpela wrote:
> Yep, just checked.  RND(1) seems more typical.  There are a few basic
> dialects listed on my Ahl's simple benchmark page...
> 
> http://setiathome.ssl.berkeley.edu/~korpela/ahl/
> 
> Eric

I see the page -- but where the results?  That is the most interesting part. 
Measuring the dc bias of the random generator this way (with only 1000 samples) 
is pretty meaningless.

Here goes for some machines I have at hand that aren't MS BASIC varients.  All 
use the generic BASIC version listed on your page, with exceptions noted.

Wang BASIC (1st generation 2200T CPU)

     Time: 2:46
     Accuracy: 1.14320000E-05
     Random: 13.68, 22.9, 10.0, 9.5, 2.04, 17.9, 15.6, ...
     Notes: all math is double precision BCD
            RND is particularly slow on this BASIC

Wang BASIC-2 (2nd generation 2200VP CPU)

     Time: 4.94 seconds
     Accuracy:  .000000076
     Random: 2.16, 4.98, 7.22, 14.01, 27.2, 1.16, 21.7, ...
     Notes: all math is double precision BCD

Processor Technology BASIC/5

     Time: 3:52
     Accuracy: .1021
     Random: 30.2, 19.3, 6.5, 17.1, 4.4, 20.7, 2.1, ...
     Notes: must use RND(1)
            must use A=A*A instead of A=A^2

Processor Technology Extended Cassette BASIC

     Time: 3:17
     Accuracy: .0379
     Random: 9.79, 13.6,  8.0, 34.6, 23.4, 4.28, ...
     Notes: must use RND(0);
            A=A*A instead: time = 1:41, accuracy = .0009

IBM 5120

     Time: 39 seconds
     Accuracy: 3.458354E-10
     Random: .042, 0.89, 25.3, 11.4, 9.5, ...
     Notes: must use RND, and use RND(val) to set the seed
            only one statement per line allowed
            numerics are double precision binary

TI CC40

     Time: 5:42
     Accuracy: .00000011
     Random:  13.0, 11.7, 5.71, 6.9, 2.1, ...
     Notes: uses double precision numbers with base-100 encoding

I have a few other machines I could run this on, but would require some 
rearranging to get them set up: HP-87, Heath H89 Benton Harbor BASIC, a few 
varieties of CP/M BASICs, a TI-74 handheld.




More information about the cctech mailing list