Pi day - multiprecision Pi in 8-bit Basics

Here’s Gerson Barbosa running his pi program on an MSX machine:

It’s based in part on some multi-precision routines written by Katie Wasserman for the HP-75 handheld, in her own Pi program - actually more efficient because it uses a different approach.

So that give us two Pi programs which we can run on various machines. I ported to BBC Basic and was pleased to be able to speed up the one by 3x and the other by nearly 2x. I posted my work over on stardot:
Pi Day - many digits of Pi (again, twice)

Gerson’s program gives us 36 digits in 3 minutes on a Beeb. I’ve checked it up to 160 digits in BeebJit.

Katie’s program gives us 100 digits in under a minute on a Beeb. I’ve checked it up to 1550 digits…

1 Like

800 digits in 3019 seconds:
image

(The final few digits not correct, as expected. In this case as many as 4, because 3185 isn’t all that far from 2805. It’s really a 3 digit error, because of all the accumulated truncated terms.)