Chapter 13. Computing π

It is truly amazing that a number so easily described—the ratio of a circle's circumference to its diameter—could have occupied the minds of so many eminent mathematicians over the centuries. The number π is both irrational and transcendental,[1] and people have been attempting to devise formulas and algorithms that compute estimates of its value or that can generate as many of its exact digits as possible.

In this chapter, we'll look at some of these attempts. The BigFunctions class we wrote in Chapter 12 will enable us to test some of the formulas and algorithms.

Estimates of π and Ramanujan's Formulas

Some people claim that the Christian Bible implies that the value of π is 3. Other estimates that were used throughout history ...

Get Java™ Number Cruncher: The Java Programmer's Guide to Numerical Computing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.