One line PI generator
#1
A one line PI generator because I got bored:

Code:
DEFDBL A-Z: L = 1: T = TIMER: DO UNTIL TIMER - T > 10: X = X + 1 / L - 1 / (L + 2): L = L + 4: LOOP: P = 4 * X: PRINT LEFT$(LTRIM$(STR$(P)), 9)
dndbbs project:

Links to my MUD: (strictly 16-bit); AKA XP:

Dndbbs executables
http://www.filegate.net/pdn/pdnbasic/dnd50a1e.zip

Dndbbs source
http://www.filegate.net/pdn/pdnbasic/dnd50a1s.zip

Dndbbs upgrade
http://www.filegate.net/pdn/pdnbasic/dnd50a1u.zip

DNDDOOR - https://bit.ly/EriksDNDDoor DUNGEON - https://bit.ly/EriksDungeon
Interpreter - https://bit.ly/EriksSICK Hex Editor - https://bit.ly/EriksHexEditor Utilities - https://bit.ly/EriksUtils
QB45 files: - https://bit.ly/EriksQB45 QB64shell - https://bit.ly/QB64shell Some old QB64 versions: - https://bit.ly/OldQB64
Reply
#2
TT pie, bplus cooking with Jack's pi and Steve's ASCII pie:
Code:
pi## = 47: FOR n## = 23 TO 1 STEP -1: pi## = (2 * n## - 1) + (n## * n##) / pi##: NEXT: p$ = STR$(4 / pi##): FOR i = 2 TO LEN(p$): LOCATE 18 - (i - 1), i ^ 2 / 7 + 13: PRINT MID$(p$, i, 1): NEXT: LOCATE 18, 1: PRINT "             (" + CHR$(10) + "              )" + CHR$(10) + "         __..---..__" + CHR$(10) + "     ,-='  /  |  \  `=-.," + CHR$(10) + "  ;-'..________________..'-;" + CHR$(10) + "     \.,______________,./"


Attached Files Thumbnail(s)

B += x
Reply