Volume 2 of Donald Knuth’s classic series The Art of Computer Programming covers seminumerical algorithms, with topics ranging from random number generators to floating point operations and other optimized arithmetic algorithms. Truly comprehensive and meticulously written, this book (and series) is that rarest of all creatures–a work of authoritative scholarship in classical computer science, but one that can be read and used profitably by virtually all working programmers.
The book begins with fundamental questions regarding random numbers and how to use algorithms to generate them. Subsequent chapters demonstrate efficient computation of single-precision and double-precision arithmetic calculations and modular arithmetic. The text then presents prime factorization (which can be used in cryptography, for instance) and algorithms for calculating fractions. This volume ends with algorithms for polynomial arithmetic and manipulation of power-series topics, which will benefit those with some knowledge of calculus.
Throughout this beautifully presented edition, Knuth incorporates hundreds of useful exercises for trying out the algorithms. These range from simple problems to larger research project topics. (The book provides answers, where appropriate, at the end of the book.) The result is a text that’s suitable for college or graduate-level computer science courses or individual study by programmers. Volume 2 is an indispensable part of any working programmer’s library.