Happy Pi Day! The Wallis product is a 371-year-old formula that computes pi by multiplying fractions forever. I ran it on a C64 in BASIC, assembly, Python, and C. The C64 took 15 minutes for five digits. C got 8 in 0.87 seconds on a Mac M4. Eat some Pi and compute at 1MHz today! https://imapenguin.com/2026/03/the-wallis-product-for-pi-on-the-c64/
@mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
#commodorepet #piday #oscar64
@root42 @mrdoornbos ...it should have read "31416 Bytes Free" though 😜