Big Integers and Rational Arithmetic
摘要
Big integers differ from standard integers in that they are of arbitrary size; the number of digits is limited only by the memory available. This chapter examines how big integers are represented in memory and how to perform arithmetic with them. We also discuss some implementations that might be of use when using programming languages that do not support big integers natively. Next, we examine rational arithmetic with big integers. Finally, we conclude with some advice on when using big integers and rational numbers might be advantageous.