Arbitrary-precision arithmetic
Builds on IntegersFloating-point arithmetic
Definition
Fix an integer base , in practice a power of such as . In arbitrary-precision arithmetic an integer is stored as a sign and a list of digits . Here and where the length is not fixed in advance and grows as needed. Arithmetic operations on such lists return the exact integer result in the same form. Rational numbers are stored as pairs of such integers. Real numbers are stored as floating-point numbers , where and are such integers and the precision is chosen by the user.
Remarks
Example: with , the integer is the list ; adding changes only , while adding produces a list of length . Non-example: IEEE binary64 arithmetic is not arbitrary-precision; its precision is fixed at bits, so cannot be stored exactly. Addition of two -digit numbers costs digit operations, schoolbook multiplication costs , and Karatsuba multiplication costs .
Reading path
To understand this page from the ground up, read these 3 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Floating-point arithmetic concept
- Integers object
- Arbitrary-precision arithmetic definition
Further reading
About this page
| Tag | 8Y4C6N09YQ |
|---|---|
| URI | m2://8Y4C6N09YQ |
| Kind | definition |
| Writing | W0 stub |
| MSC | 65Y04, 68W30 |
| Defines | Arbitrary-precision arithmetic |
| Uses | Integers, Floating-point arithmetic |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.