Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Tested various micros running this FLOATING POINT program.

Tested various micros running this FLOATING POINT program.

Scheduled Pinned Locked Moved Uncategorized
bbcmicroacornelectronvic20c64c16
2 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • electron_greg@oldbytes.spaceE This user is from outside of this forum
    electron_greg@oldbytes.spaceE This user is from outside of this forum
    electron_greg@oldbytes.space
    wrote last edited by
    #1

    Tested various micros running this FLOATING POINT program. It derives Pi to 20 decimal places. Interesting stats.

    1 N=20: L=INT(10*N/3): DIM A(255): Z$="000000":T$="999999"
    2 FOR I=1 TO L: A(I)=2: NEXT I: M=0: P=0: FOR J=1 TO N: Q=0: K=2*L+1
    3 FOR I=L TO 1 STEP -1: K=K-2: X=10*A(I)+Q*I: Q=INT(X/K): A(I)=X-Q*K: NEXT I
    4 Y =INT(Q/10): A(1)=Q-10*Y: Q=Y: IF Q=9 THEN LET M=M+1: GOTO 7
    5 IF Q=10 THEN PRINT STR$(P+1);LEFT$(Z$,M);: P=0: M=0: GOTO 7
    6 PRINT STR$(P);LEFT$(T$,M);: P=Q: M=0
    7 NEXT J:PRINT STR$(P)

    #RC2014 : 14 (thank you JonV)
    #BBCMicro : 19
    #AmstradCPC : 22 (thank you Devlin)
    #AcornElectron : 25
    #C128 : 27 (fast mode - thank you Jonas H)
    #VIC20 : 36
    #AcornAtom : 37
    #CBMPET : 43
    #C64 : 43
    #Dragon32 : 44
    #C16 : 46
    #Altair8800 : 52
    #MSX : 53 (thank you Pixel Purrito)
    #C128 : 56 (default "mode")
    #ZX80 : 57
    #ZXSpectrum : 68 (thank you Adam)

    Edit: now ordered (seconds)

    petererer@fuzzle.me.ukP 1 Reply Last reply
    0
    • electron_greg@oldbytes.spaceE electron_greg@oldbytes.space

      Tested various micros running this FLOATING POINT program. It derives Pi to 20 decimal places. Interesting stats.

      1 N=20: L=INT(10*N/3): DIM A(255): Z$="000000":T$="999999"
      2 FOR I=1 TO L: A(I)=2: NEXT I: M=0: P=0: FOR J=1 TO N: Q=0: K=2*L+1
      3 FOR I=L TO 1 STEP -1: K=K-2: X=10*A(I)+Q*I: Q=INT(X/K): A(I)=X-Q*K: NEXT I
      4 Y =INT(Q/10): A(1)=Q-10*Y: Q=Y: IF Q=9 THEN LET M=M+1: GOTO 7
      5 IF Q=10 THEN PRINT STR$(P+1);LEFT$(Z$,M);: P=0: M=0: GOTO 7
      6 PRINT STR$(P);LEFT$(T$,M);: P=Q: M=0
      7 NEXT J:PRINT STR$(P)

      #RC2014 : 14 (thank you JonV)
      #BBCMicro : 19
      #AmstradCPC : 22 (thank you Devlin)
      #AcornElectron : 25
      #C128 : 27 (fast mode - thank you Jonas H)
      #VIC20 : 36
      #AcornAtom : 37
      #CBMPET : 43
      #C64 : 43
      #Dragon32 : 44
      #C16 : 46
      #Altair8800 : 52
      #MSX : 53 (thank you Pixel Purrito)
      #C128 : 56 (default "mode")
      #ZX80 : 57
      #ZXSpectrum : 68 (thank you Adam)

      Edit: now ordered (seconds)

      petererer@fuzzle.me.ukP This user is from outside of this forum
      petererer@fuzzle.me.ukP This user is from outside of this forum
      petererer@fuzzle.me.uk
      wrote last edited by
      #2

      @electron_greg@oldbytes.space Sophie Wilson did a fantastic job.

      1 Reply Last reply
      1
      0
      • System shared this topic
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups