π approximation script, from Stephen Chappell. import sys def pi(): a, b, c, d, e, f = 1, 0, 1, 1, 3, 3 while True: if a * 4 + b – c < c * e: yield e a, b, c, d, e, f = a * 10, (b – c * e) * [...]
Displaying posts tagged with
By Iddo on March 14th, 2010
π approximation script, from Stephen Chappell. import sys def pi(): a, b, c, d, e, f = 1, 0, 1, 1, 3, 3 while True: if a * 4 + b – c < c * e: yield e a, b, c, d, e, f = a * 10, (b – c * e) * [...]

Byte Size Biology is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.