# Arb - a C library for arbitrary-precision ball arithmetic¶

Welcome to Arb’s documentation!
Arb is a C library for rigorous real and complex arithmetic with arbitrary precision.
Arb tracks numerical errors automatically using
*ball arithmetic*, a form of interval arithmetic based on a midpoint-radius
representation.
On top of this, Arb provides a wide range of mathematical functionality, including polynomials,
power series, matrices, integration, root-finding, and many transcendental functions.
Arb is designed with efficiency as a primary goal, and is usually competitive with or faster
than other arbitrary-precision packages.
The code is thread-safe, portable, and extensively tested.

Arb is free software distributed under the GNU Lesser General Public License (LGPL), version 2.1 or later (see License).

The git repository is https://github.com/fredrik-johansson/arb/

Arb is developed by Fredrik Johansson (fredrik.johansson@gmail.com), with help from many contributors (see Credits and references). Questions and discussion about Arb are welcome on the flint-devel mailing list. There is also an issue tracker for bug reports and feature requests. Development progress is sometimes covered on Fredrik’s blog.

This documentation is available in HTML format at http://arblib.org and in PDF format at http://arblib.org/arb.pdf. This edition of the documentation was updated Dec 06, 2020 and describes Arb 2.19.0. Documentation for specific release versions is also available in PDF format.

## General information¶

## Example programs¶

## Floating-point numbers¶

Arb uses two custom floating-point types in its implementation of ball
arithmetic. The radius of a ball is represented using the type *mag_t* which is
unsigned and has a fixed precision. The midpoint is represented using the
type *arf_t* which has arbitrary precision.

## Real and complex numbers¶

Real numbers (*arb_t*) are represented as midpoint-radius intervals,
also known as balls. Complex numbers (*acb_t*) are represented in rectangular
form, with *arb_t* balls for the real and imaginary parts.

**arb.h**– real numbers- Types, macros and constants
- Memory management
- Assignment and rounding
- Assignment of special values
- Input and output
- Random number generation
- Radius and interval operations
- Comparisons
- Arithmetic
- Dot product
- Powers and roots
- Exponentials and logarithms
- Trigonometric functions
- Inverse trigonometric functions
- Hyperbolic functions
- Inverse hyperbolic functions
- Constants
- Lambert W function
- Gamma function and factorials
- Zeta function
- Bernoulli numbers and polynomials
- Polylogarithms
- Other special functions
- Internals for computing elementary functions
- Vector functions

**acb.h**– complex numbers- Types, macros and constants
- Memory management
- Basic manipulation
- Input and output
- Random number generation
- Precision and comparisons
- Complex parts
- Arithmetic
- Dot product
- Mathematical constants
- Powers and roots
- Exponentials and logarithms
- Trigonometric functions
- Inverse trigonometric functions
- Hyperbolic functions
- Inverse hyperbolic functions
- Lambert W function
- Rising factorials
- Gamma function
- Zeta function
- Polylogarithms
- Arithmetic-geometric mean
- Other special functions
- Piecewise real functions
- Vector functions

## Polynomials and power series¶

These modules implement dense univariate polynomials with real and complex coefficients. Truncated power series are supported via methods acting on polynomials, without introducing a separate power series type.

**arb_poly.h**– polynomials over the real numbers- Types, macros and constants
- Memory management
- Basic manipulation
- Conversions
- Input and output
- Random generation
- Comparisons
- Bounds
- Arithmetic
- Composition
- Evaluation
- Product trees
- Multipoint evaluation
- Interpolation
- Differentiation
- Transforms
- Powers and elementary functions
- Lambert W function
- Gamma function and factorials
- Zeta function
- Root-finding
- Other special polynomials

**acb_poly.h**– polynomials over the complex numbers- Types, macros and constants
- Memory management
- Basic properties and manipulation
- Input and output
- Random generation
- Comparisons
- Conversions
- Bounds
- Arithmetic
- Composition
- Evaluation
- Product trees
- Multipoint evaluation
- Interpolation
- Differentiation
- Transforms
- Elementary functions
- Lambert W function
- Gamma function
- Power sums
- Zeta function
- Other special functions
- Root-finding

## Transforms¶

## Matrices¶

These modules implement dense matrices with real and complex coefficients. Rudimentary linear algebra is supported.

**arb_mat.h**– matrices over the real numbers- Types, macros and constants
- Memory management
- Conversions
- Random generation
- Input and output
- Comparisons
- Special matrices
- Transpose
- Norms
- Arithmetic
- Scalar arithmetic
- Gaussian elimination and solving
- Cholesky decomposition and solving
- Characteristic polynomial and companion matrix
- Special functions
- Sparsity structure
- Component and error operations
- Eigenvalues and eigenvectors

**acb_mat.h**– matrices over the complex numbers- Types, macros and constants
- Memory management
- Conversions
- Random generation
- Input and output
- Comparisons
- Special matrices
- Transpose
- Norms
- Arithmetic
- Scalar arithmetic
- Gaussian elimination and solving
- Characteristic polynomial and companion matrix
- Special functions
- Component and error operations
- Eigenvalues and eigenvectors

## Special functions¶

These modules implement mathematical functions with complexity
that goes beyond the basics covered directly in the *arb* and *acb*
modules.

**acb_hypgeom.h**– hypergeometric functions of complex variables- Convergent series
- Asymptotic series
- Generalized hypergeometric function
- Confluent hypergeometric functions
- Error functions and Fresnel integrals
- Bessel functions
- Modified Bessel functions
- Airy functions
- Coulomb wave functions
- Incomplete gamma and beta functions
- Exponential and trigonometric integrals
- Gauss hypergeometric function
- Orthogonal polynomials and functions
- Dilogarithm

**arb_hypgeom.h**– hypergeometric functions of real variables- Generalized hypergeometric function
- Confluent hypergeometric functions
- Gauss hypergeometric function
- Error functions and Fresnel integrals
- Incomplete gamma and beta functions
- Exponential and trigonometric integrals
- Bessel functions
- Airy functions
- Coulomb wave functions
- Orthogonal polynomials and functions
- Dilogarithm
- Hypergeometric sequences

**acb_elliptic.h**– elliptic integrals and functions of complex variables**acb_modular.h**– modular forms of complex variables**dirichlet.h**– Dirichlet characters**acb_dirichlet.h**– Dirichlet L-functions, Riemann zeta and related functions- Roots of unity
- Truncated L-series and power sums
- Riemann zeta function
- Riemann-Siegel formula
- Hurwitz zeta function
- Hurwitz zeta function precomputation
- Stieltjes constants
- Dirichlet character evaluation
- Dirichlet character Gauss, Jacobi and theta sums
- Discrete Fourier transforms
- Dirichlet L-functions
- Hardy Z-functions
- Gram points
- Riemann zeta function zeros
- Riemann zeta function zeros (Platt’s method)

**bernoulli.h**– support for Bernoulli numbers**hypgeom.h**– support for hypergeometric series**partitions.h**– computation of the partition function

## Calculus¶

Using ball arithmetic, it is possible to do rigorous root-finding and integration (among other operations) with generic functions. This code should be considered experimental.

## Extra utility modules¶

Mainly for internal use.

## Supplementary algorithm notes¶

Here, we give extra proofs, error bounds, and formulas that would be too lengthy to reproduce in the documentation for each module.