Summary


About the Pi-Generating Algorithm

The algorithm used for the calculation of pi in this chapter is an example of a spigot algorithm. A spigot algorithm outputs digits incrementally, and does not reuse them after producing them. Spigot algorithms are known for both pi and e. A spigot algorithm for calculating the value of pi to any predetermined number of digits was first published by Rabinowitz and Wagon in 1995. It is not limited in the number of digits it can produce, but it is inherently bounded because it requires the number of desired digits to be specified up front as an input to the algorithm. In an article copyrighted in 2005, Jeremy Gibbons proposed a spigot algorithm based on Rabinowitz and Wagon’s algorithm that doesn’t have this limitation. It is unbounded and, as such, was an ideal candidate for this chapter’s computationally intensive threads.




Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net