Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape16a_acorn_eu_1990_november.wav » PiCalc

PiCalc

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape16a_acorn_eu_1990_november.wav
Filename: PiCalc
Read OK:
File size: 01F6 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
    0 REM Pi - Three Formulae
   10 REM by Jon Millington
   20 REM (c) The Micro User
   30 MODE 7:VDU 23,1,0;0;0;0;
   40 PRINT"1-Vieta 2-Wallis 3-Leibniz"
   50 ON GET-48 GOTO 200,130,60 ELSE 50
   60 PRINT''"Leibniz":V=4:N%=1
   70 REPEAT
   80 PRINT TAB(9,14);V TAB(16);N%
   90 N%=N%+2:V=V-4/N%
  100 PRINT TAB(9,10);V TAB(16);N%
  110 N%=N%+2:V=V+4/N%
  120 UNTIL V=PI
  130 PRINT''"Wallis":V=2:N%=0
  140 REPEAT
  150 N%=N%+2:V=V*N%/(N%-1)
  160 PRINT TAB(9,14);V TAB(16);N%-1
  170 V=V*N%/(N%+1)
  180 PRINT TAB(9,10);V TAB(16);N%+1
  190 UNTIL V=PI
  200 PRINT''"Vieta"':V=2:N=SQR 2
  210 REPEAT PRINT;V
  220 V=2*V/N:N=SQR(2+N)
  230 UNTIL V=PI
 � Pi - Three Formulae

 � by Jon Millington
 � (c) The Micro User
 � 7:� 23,1,0;0;0;0;
(" �"1-Vieta 2-Wallis 3-Leibniz"
2# � �-48 � �dH@,�tB@,�T|@ � �Tr@
< �''"Leibniz":V=4:N%=1
F �
P � �9,14);V �16);N%
Z N%=N%+2:V=V-4/N%
d � �9,10);V �16);N%
n N%=N%+2:V=V+4/N%
x
 � V=�
� �''"Wallis":V=2:N%=0
� �
� N%=N%+2:V=V*N%/(N%-1)
� � �9,14);V �16);N%-1
� V=V*N%/(N%+1)
� � �9,10);V �16);N%+1
�
 � V=�
� �''"Vieta"':V=2:N=� 2
�
 � �;V
� V=2*V/N:N=�(2+N)
�
 � V=�
�
00000000  0d 00 00 1a 20 f4 20 50  69 20 2d 20 54 68 72 65  |.... . Pi - Thre|
00000010  65 20 46 6f 72 6d 75 6c  61 65 0d 00 0a 18 20 f4  |e Formulae.... .|
00000020  20 62 79 20 4a 6f 6e 20  4d 69 6c 6c 69 6e 67 74  | by Jon Millingt|
00000030  6f 6e 0d 00 14 19 20 f4  20 28 63 29 20 54 68 65  |on.... . (c) The|
00000040  20 4d 69 63 72 6f 20 55  73 65 72 0d 00 1e 18 20  | Micro User.... |
00000050  eb 20 37 3a ef 20 32 33  2c 31 2c 30 3b 30 3b 30  |. 7:. 23,1,0;0;0|
00000060  3b 30 3b 0d 00 28 22 20  f1 22 31 2d 56 69 65 74  |;0;..(" ."1-Viet|
00000070  61 20 32 2d 57 61 6c 6c  69 73 20 33 2d 4c 65 69  |a 2-Wallis 3-Lei|
00000080  62 6e 69 7a 22 0d 00 32  23 20 ee 20 a5 2d 34 38  |bniz"..2# . .-48|
00000090  20 e5 20 8d 64 48 40 2c  8d 74 42 40 2c 8d 54 7c  | . .dH@,.tB@,.T||
000000a0  40 20 8b 20 8d 54 72 40  0d 00 3c 1a 20 f1 27 27  |@ . .Tr@..<. .''|
000000b0  22 4c 65 69 62 6e 69 7a  22 3a 56 3d 34 3a 4e 25  |"Leibniz":V=4:N%|
000000c0  3d 31 0d 00 46 06 20 f5  0d 00 50 17 20 f1 20 8a  |=1..F. ...P. . .|
000000d0  39 2c 31 34 29 3b 56 20  8a 31 36 29 3b 4e 25 0d  |9,14);V .16);N%.|
000000e0  00 5a 15 20 4e 25 3d 4e  25 2b 32 3a 56 3d 56 2d  |.Z. N%=N%+2:V=V-|
000000f0  34 2f 4e 25 0d 00 64 17  20 f1 20 8a 39 2c 31 30  |4/N%..d. . .9,10|
00000100  29 3b 56 20 8a 31 36 29  3b 4e 25 0d 00 6e 15 20  |);V .16);N%..n. |
00000110  4e 25 3d 4e 25 2b 32 3a  56 3d 56 2b 34 2f 4e 25  |N%=N%+2:V=V+4/N%|
00000120  0d 00 78 0a 20 fd 20 56  3d af 0d 00 82 19 20 f1  |..x. . V=..... .|
00000130  27 27 22 57 61 6c 6c 69  73 22 3a 56 3d 32 3a 4e  |''"Wallis":V=2:N|
00000140  25 3d 30 0d 00 8c 06 20  f5 0d 00 96 1a 20 4e 25  |%=0.... ..... N%|
00000150  3d 4e 25 2b 32 3a 56 3d  56 2a 4e 25 2f 28 4e 25  |=N%+2:V=V*N%/(N%|
00000160  2d 31 29 0d 00 a0 19 20  f1 20 8a 39 2c 31 34 29  |-1).... . .9,14)|
00000170  3b 56 20 8a 31 36 29 3b  4e 25 2d 31 0d 00 aa 12  |;V .16);N%-1....|
00000180  20 56 3d 56 2a 4e 25 2f  28 4e 25 2b 31 29 0d 00  | V=V*N%/(N%+1)..|
00000190  b4 19 20 f1 20 8a 39 2c  31 30 29 3b 56 20 8a 31  |.. . .9,10);V .1|
000001a0  36 29 3b 4e 25 2b 31 0d  00 be 0a 20 fd 20 56 3d  |6);N%+1.... . V=|
000001b0  af 0d 00 c8 1a 20 f1 27  27 22 56 69 65 74 61 22  |..... .''"Vieta"|
000001c0  27 3a 56 3d 32 3a 4e 3d  b6 20 32 0d 00 d2 0a 20  |':V=2:N=. 2.... |
000001d0  f5 20 f1 3b 56 0d 00 dc  15 20 56 3d 32 2a 56 2f  |. .;V.... V=2*V/|
000001e0  4e 3a 4e 3d b6 28 32 2b  4e 29 0d 00 e6 0a 20 fd  |N:N=.(2+N).... .|
000001f0  20 56 3d af 0d ff                                 | V=...|
000001f6
PiCalc.m0
PiCalc.m1
PiCalc.m2
PiCalc.m4
PiCalc.m5