This number will probably look familiar to the readers of this review, and most readers can probably point to at least one digit that is not what was expected. In fact, the number above is the beginning of the decimal representation of the sum of the first 50,000 terms of the series 4 (1 - 1/3 + 1/5 - 1/7 + ... ). The full infinite series adds to π but does so very very slowly. Since this is an alternating series, it is easy to determine that the partial sum of these 50,000 terms should be within about 0.00004 of π. So, the fact that it is close to but not exactly π is not surprising. What is surprising is that so many of the decimal places are correct! Only three of the digits listed above are incorrect. The reasons for this were explained in an article in the American Mathematical Monthly [Vol. 96 (1989), 681-687] and are contained in the book being reviewed here.
Let me begin this review by stating simply that I know of no better book than this one for those interested in everything π. While the book itself has fewer than 300 pages, it is packed with information, formulas, historical notes, etc. Just about anything you could want is here. The following list of chapter titles should give an idea of what is here: The State of π Art, How Random is π?, Shortcuts to π, Approximations for π and Continued Fractions, Arcus Tangens, Spigot Algorithms, Gauss and π, Ramanujan and π, The Borweins and π, The BBP Algorithm, Arithmetic, Miscellaneous, The History of π, Historical Notes, The Future: π Calculations on the Internet, π Formula Collection, Tables. In addition, there is a brief appendix: Documentation for the hfloat Library. There is a very good index, and, for those interested in more details than this book can provide, there is a lengthy bibliography with 123 references.
The CD-ROM that comes with the book is also quite full. Much of the space is taken up with raw data. The first one million decimal places of π, the first one million hexadecimal places of π, the first 20,000 decimal places of e, and the first 10,000 decimal places of log(2) are included in dvi and ps formats. And, the first 400 million digits of π are included in a set of 40 text files. But, the real prizes on this CD-ROM are the libraries and algorithms. The hfloat (huge float) package is included as are apfloat (a C++ arbitrary precision library by Mikko Tommila) and cln (a class library for numbers by Bruno Haible). Also, Carey Bloodworth's piagm package for high precision (π) calculations is included. There is source code for the BBP algorithm, arctan formulas for calculating digits of π, the spigot algorithm, monte carlo algorithms, and more. Executables (mostly for DOS or Windows) are included with most of the source code.
π Unleashed can be used as a reference book or it can be read straight through as one would read a textbook or a novel. It begins with an overview of π. The latest record is given, several formulas and algorithms are presented and discussed briefly, and the question of whether or not π is normal is asked. Later chapters expand on these and other issues. A brief chapter discusses what is known thus far about the distribution of the digits in the decimal representation of π and presents some oddities and statistical results. Separate chapters are devoted to the roles of Gauss, Ramanujan, and the Borweins in the history of π calculation.
Several algorithms are discussed in some detail. The spigot algorithm for calculating π is presented as is a similar algorithm for calculating e. This is an interesting algorithm in that the digits are not computed all at once but sequentially in chunks of several digits. This means that large storage buffers are not necessary and makes it an ideal algorithm for desktop computers. What makes this book especially nice is that when algorithms are presented, they are explained thoroughly. Not only is the mathematics explained (so that we understand that the result will indeed be π) but so too is the programming logic (so that we see what makes the algorithm efficient). The amazing BBP algorithm (which gives isolated hexadecimal digits of π) is also described. Code for both of these algorithms is included on the CD-ROM provided with the book.
There is a chapter on arithmetic. This may seem strange in a book on π, but when a computer is used to calculate billions of digits of π, it is not enough to have an efficient π algorithm. It is also necessary to perform arithmetic operations as efficiently as possible. In particular, an efficient method for multiplication of long numbers can have an enormous effect on the time required for such calculations. Ordinary multiplication of N digit numbers requires a time proportional to N squared. A technique called Karatsuba multiplication (described in the book) requires a time proportional to N raised to the 1.583 power. While this is an enormous savings when N is large, a third method called FFT multiplication requires a time proportional to only N log(N). This gives an astonishing savings over either of the other methods. FFT multiplication is discussed in the book and there is a tutorial on the method on the CD-ROM. Techniques for rapid division and root extraction are also discussed in the book.
Two chapters are especially nice for those who enjoy tables of various sorts. An entire chapter is devoted to π formulas. There are 154 different formulas for computing π and related constants. The final chapter of the book contains tables of digits: 5000 decimal digits of π, 5000 hexadecimal digits of π, 2000 continued fraction elements (decimal) of π, and for good measure, 100 digits of many constants relating to π and e.
There is more in the book: fascinating π trivia, intriguing formulas, and predictions for the future. There is far too much to describe in a brief review. Of course, no book is perfect and this one has a few minor errors (perhaps occurring in the translation process) such as the description of the constant e as a limiting balance in an interest bearing account earning "100% interest per interest period" as "this interest period became ever shorter." Clearly, this should read 100% interest per year. But these mistakes are minor and do not detract from the overall quality of the book. This book is a must have for π aficionados and would fit comfortably in the mathematics collection of high school and university libraries. I recommend it highly.
Carl D. Mueller (cmueller@canes.gsw.edu) is Associate Professor of Mathematics at Georgia Southwestern State University in Americus, GA.