O'Reilly logo

Art of Computer Programming, Volume 2, The: Seminumerical Algorithms by Donald E. Knuth

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

4.3. Multiple-Precision Arithmetic

Let us now consider operations on numbers that have arbitrarily high precision. For simplicity in exposition, we shall assume that we are working with integers, instead of with numbers that have an embedded radix point.

4.3.1. The Classical Algorithms

In this section we shall discuss algorithms for

a) addition or subtraction of n-place integers, giving an n-place answer and a carry;

b) multiplication of an m-place integer by an n-place integer, giving an (m + n)-place answer;

c) division of an (m + n)-place integer by an n-place integer, giving an (m + 1)-place quotient and an n-place remainder.

These may be called the classical algorithms, since the word “algorithm” was used only in connection with these ...

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