O'Reilly logo

Java™ Number Cruncher: The Java Programmer's Guide to Numerical Computing by Ronald Mak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required