# Welcome to mpmath’s documentation!

Mpmath is a Python library for arbitrary-precision floating-point arithmetic. For general information about mpmath, see the project website https://mpmath.org/

These documentation pages include general information as well as docstring listing with extensive use of examples that can be run in the interactive Python interpreter. For quick access to the docstrings of individual functions, use the index listing, or type `help(mpmath.function_name)` in the Python interactive prompt.

## Introduction

- Setting up mpmath
  - Download and installation
  - Using gmpy2 (optional)
  - Running tests
  - Compiling the documentation
  - Mpmath under Sage
- Basic usage
  - Number types
  - Setting the precision
  - Providing correct input
  - Printing

## Basic features

- Contexts
  - Common interface
  - Arbitrary-precision floating-point (`mp`)
  - Arbitrary-precision interval arithmetic (`iv`)
  - Fast low-precision arithmetic (`fp`)
- Utility functions
  - Conversion and printing
  - Arithmetic operations
  - Complex components
  - Integer and fractional parts
  - Tolerances and approximate comparisons
  - Properties of numbers
  - Number generation
  - Precision management
  - Performance and debugging
- Plotting
  - Function curve plots
  - Complex function plots
  - 3D surface plots
- Command-Line Usage
  - python -m mpmath

## Advanced mathematics

On top of its support for arbitrary-precision arithmetic, mpmath provides extensive support for transcendental functions, evaluation of sums, integrals, limits, roots, and so on.

- Mathematical functions
  - Mathematical constants
  - Powers and logarithms
  - Trigonometric functions
  - Hyperbolic functions
  - Signal functions
  - Factorials and gamma functions
  - Exponential integrals and error functions
  - Bessel functions and related functions
  - Orthogonal polynomials
  - Hypergeometric functions
  - Elliptic functions
  - Zeta functions, L-series and polylogarithms
  - Number-theoretical, combinatorial and integer functions
  - q-functions
- Numerical calculus
  - Polynomials
  - Root-finding and optimization
  - Sums, products, limits and extrapolation
  - Differentiation
  - Numerical integration (quadrature)
  - Ordinary differential equations
  - Function approximation
  - Numerical inverse Laplace transform
- Matrices
  - Creating matrices
  - Matrix operations
  - Linear algebra
  - Interval and double-precision matrices
  - Matrix functions
- Number identification
  - Constant recognition
  - Algebraic identification
  - Integer relations (PSLQ)

## End matter

- Precision and representation issues
  - Precision, error and tolerance
  - Representation of numbers
  - Decimal issues
  - Correctness guarantees
  - Double precision emulation
  - Further reading
- References
- Index