Monday, August 7, 2017

Factorial Generator

This provides a pretty good comparison of different machines.
It's not a perfect benchmark since different machines have different screen width and some scroll faster, but then the MC-10 is using higher precision math than many other machines.

The MC-10 is quite competitive here.  It won't keep up with a CoCo in high speed mode, but it beats most 1 MHz systems .

5 REM FACTORIAL GENERATOR
10 FOR Z=1 TO 100
20 FOR X=0 TO 33
30 GOSUB 80
40 PRINT Z;X;A
50 NEXT X
60 NEXT Z
70 END
80 A=1
90 IF X=0 THEN RETURN
100 FOR C=1 TO X
110 A=A*C
120 NEXT C
130 RETURN

No comments:

Post a Comment