2013-08-06 14:10:45 +02:00
|
|
|
.. _overview:
|
|
|
|
|
2012-10-11 13:09:44 +02:00
|
|
|
Feature overview
|
|
|
|
===============================================================================
|
|
|
|
|
|
|
|
Ball arithmetic, also known as mid-rad interval arithmetic, is an
|
|
|
|
extension of floating-point arithmetic in which an error bound is
|
2016-02-28 19:19:05 +01:00
|
|
|
attached to each variable. This allows computing rigorously with
|
|
|
|
real and complex numbers.
|
|
|
|
|
|
|
|
With plain floating-point arithmetic, the user must do an error analysis
|
|
|
|
to guarantee that results are correct. Manual error analysis is time-consuming
|
|
|
|
and bug-prone. Ball arithmetic effectively makes error analysis
|
|
|
|
automatic.
|
|
|
|
|
|
|
|
In traditional (inf-sup) interval arithmetic, both endpoints of an interval
|
|
|
|
`[a,b]` are full-precision numbers, which makes interval arithmetic
|
|
|
|
twice as expensive as floating-point arithmetic.
|
|
|
|
In ball arithmetic, only the midpoint *m* of an interval `[m \pm r]`
|
|
|
|
is a full-precision number, and a few bits suffice for the radius *r*.
|
|
|
|
At high precision, ball arithmetic is therefore not more expensive than
|
|
|
|
plain floating-point arithmetic.
|
|
|
|
|
|
|
|
Joris van der Hoeven's paper [Hoe2009]_ is a good introduction to the subject.
|
2012-10-11 13:09:44 +02:00
|
|
|
|
2014-08-26 16:23:38 +02:00
|
|
|
Other implementations of ball arithmetic include
|
|
|
|
`iRRAM <http://irram.uni-trier.de/>`_ and
|
|
|
|
`Mathemagix <http://www.mathemagix.org/www/mmdoc/doc/html/main/index.en.html>`_.
|
2016-02-28 19:19:05 +01:00
|
|
|
Arb differs from earlier implementations in technical aspects of the
|
|
|
|
implementation, which makes certain computations more efficient.
|
|
|
|
It also provides a more comprehensive low-level interface, giving
|
|
|
|
the user full access to the internals. Finally, it implements a wider
|
|
|
|
range of transcendental functions, covering a large portion of the
|
|
|
|
special functions in standard reference works such as [NIST2012]_.
|
2014-08-26 16:23:38 +02:00
|
|
|
|
2016-02-28 19:19:05 +01:00
|
|
|
Arb contains:
|
2014-08-26 16:23:38 +02:00
|
|
|
|
|
|
|
* A module (:ref:`arf <arf>`) for correctly rounded arbitrary-precision
|
|
|
|
floating-point arithmetic. Arb's floating-point numbers have a few special
|
|
|
|
features, such as arbitrary-size exponents (useful for combinatorics and
|
|
|
|
asymptotics) and dynamic allocation (facilitating implementation of hybrid
|
2012-10-11 13:09:44 +02:00
|
|
|
integer/floating-point and mixed-precision algorithms).
|
|
|
|
|
2014-08-26 16:23:38 +02:00
|
|
|
* A module (:ref:`mag <mag>`) for representing magnitudes (error bounds)
|
|
|
|
more efficiently than with an arbitrary-precision floating-point type.
|
|
|
|
|
|
|
|
* A module (:ref:`arb <arb>`) for real ball arithmetic, where a ball is
|
|
|
|
implemented as an *arf* midpoint and a *mag* radius.
|
|
|
|
|
|
|
|
* A module (:ref:`acb <acb>`) for complex numbers in rectangular form,
|
2016-02-28 19:19:05 +01:00
|
|
|
represented as pairs of real balls.
|
2012-10-11 13:09:44 +02:00
|
|
|
|
2014-08-26 16:23:38 +02:00
|
|
|
* Modules (:ref:`arb_poly <arb-poly>`, :ref:`acb_poly <acb-poly>`)
|
2013-08-06 14:10:45 +02:00
|
|
|
for polynomials or power series over the real and complex numbers,
|
|
|
|
implemented using balls as coefficients,
|
|
|
|
with asymptotically fast polynomial multiplication and
|
|
|
|
many other operations.
|
2012-10-11 13:09:44 +02:00
|
|
|
|
2014-08-26 16:23:38 +02:00
|
|
|
* Modules (:ref:`arb_mat <arb-mat>`, :ref:`acb_mat <acb-mat>`)
|
2013-08-06 14:10:45 +02:00
|
|
|
for matrices over the real and complex numbers,
|
|
|
|
implemented using balls as coefficients.
|
|
|
|
At the moment, only rudimentary linear algebra operations are provided.
|
2012-10-11 13:09:44 +02:00
|
|
|
|
2016-02-28 19:19:05 +01:00
|
|
|
* Functions for high-precision evaluation of various
|
|
|
|
mathematical constants and special functions, implemented using
|
|
|
|
ball arithmetic with rigorous error bounds.
|
|
|
|
|
2014-08-26 16:23:38 +02:00
|
|
|
Arb 1.x used a different set of numerical base types (*fmpr*, *fmprb*
|
|
|
|
and *fmpcb*). These types had a slightly simpler internal representation,
|
2016-02-28 19:19:05 +01:00
|
|
|
but generally had worse performance. All methods for the Arb 1.x types
|
2014-08-26 16:23:38 +02:00
|
|
|
have now been ported to faster equivalents for the Arb 2.x types.
|
|
|
|
The last version to include both the Arb 1.x and Arb 2.x types and methods
|
2016-02-28 19:19:05 +01:00
|
|
|
was Arb 2.2. As of Arb 2.9, only a small set of *fmpr*
|
2014-08-26 16:23:38 +02:00
|
|
|
methods are left for fallback and testing purposes.
|
2014-05-27 20:14:09 +02:00
|
|
|
|
2013-05-25 02:27:50 +02:00
|
|
|
Arb uses `GMP <http://mpir.org>`_ / `MPIR <http://mpir.org>`_ and
|
|
|
|
`FLINT <http://flintlib.org/>`_
|
2016-02-28 19:19:05 +01:00
|
|
|
for the underlying integer arithmetic and various utility functions.
|
2013-05-25 02:27:50 +02:00
|
|
|
Arb also uses `MPFR <http://mpfr.org/>`_ for testing purposes
|
2016-02-28 19:19:05 +01:00
|
|
|
and internally to evaluate some functions.
|
2012-10-11 13:09:44 +02:00
|
|
|
|