2flower

Enterprise architect, DevOps fool, vintage computing nerd. Amateur photog’, too.

2025-06-10

@hisdeedsaredust Just to sanity test myself (since the program's gone) this is indeed what you get if your run 1000 iterators.

>>> def leibniz(n):
... t_sum = 0
... for i in range(n):
... term = (-1) ** i /(2*i+1)
... t_sum = t_sum + term
... return t_sum * 4
...
>>> terms=1000
>>> print("Pi = ", leibniz(terms))
Pi = 3.140592653839794

2025-06-10

@hisdeedsaredust The algorithm is an iterative one. It adds and subtracts repeatly. Each iteration approximates more and more digits. I think this was snapshotted after like 10 or 100 operations... something like that. The current display has 3.14 accurately, but the third place hasn't settled yet.

2025-06-09

What to do on a quiet spring evening? Learn some Sharp PC-1201 coding of course! Here's the Leibniz Pi algorithm. Seems accurate when comparing iteration output to a Python equivalent. Not too fast of course!

#vintagecomputing #retrocomputing #calculators

Program listing for Leibniz Pi formulaSharp PC-1201 programmable calculator, which called itself a pocket computer.
2025-05-29

Currently soothing my savage soul:

gisellaengel.bandcamp.com/trac

Recommend from Gisella Engel

#bandcamp #music #edm #techno #gisellaenge

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst