O'Reilly logo

C Interfaces and Implementations: Techniques for Creating Reusable Software by David R. Hanson - Princeton University

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 18. Arbitrary-Precision Arithmetic

This chapter describes the AP interface, which provides signed integers of arbitrary precision and arithmetic operations on them. That is, unlike XP_Ts, the integers provided by AP can be negative or positive, and they can have an arbitrary number of digits. The values that can be represented are limited only by the available memory. These integers can be used in applications that need integer values in a potentially huge range. For example, some mutual-fund companies track share prices to the nearest centicent — 1/10,000 of a dollar — and thus might do all computations in centicents. A 32-bit unsigned integer can represent only $429,496.7295, which is only a tiny fraction of the billions of dollars held ...

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