Описание тега arbitrary-precision
Sometimes the available precision of hardware-supported datatypes (most likely single precision (=32bit), double precision (=64bit), extended precision (=80bit)) is not enough to tackle some problems:
- Problems given in natural sciences and applied and theoretical mathematics which needs utmost precision. These are mostly tackled by computer algebra systems like Mathematica and Maple.
- Financial applications which must confirm to the exact rounding procedures given by law. They also should guarantee that the available range of numbers is big enough so that nonsensical results by leaving the supported range (overflow) will not occur.
- Cryptological applications which need to handle very large integers because many algorithms (integer factorization, Diffie-Hellman key exchange) are based on them.
In this case speed and portability is sacrificed to support numbers with a much higher precision available than hardware-supported datatypes. They are called arbitrary-precision numbers.
As the handling of arbitrary-precision numbers and arithmetic is not standardized yet, there may be big differences between implementations. There are different packages supporting one or more arbitrary-precision datatypes: integer, binary and decimal float or rational.
The tag should be applied to all questions which need to use arbitrary-precision numbers: Problems which need high precision, the implementation of arbitrary-precision numbers, the programming of basic operations, known caveats of specific packages etc. Some programming languages have built-in capabilities to handle arbitrary-precision (BigDecimal in Java, Bignum in Ruby).
Free software:
Axiom: Free computer algebra system with arbitrary-precision capabilities.
GMP: GNU Multiple Precision Arithmetic Library
Important books:
Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, 1998.
Muller, Jean-Michel et al. Handbook of Floating-Point Arithmetic, Chapter 14, Birkhäuser Boston, 2009.