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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Big Integers and Rational Arithmetic

  • Ronald T. Kneusel

摘要

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.