Distributed and decentralized pi calculation