Calcium¶
Calcium (pronounced “kalkium”) is a C library for exact computation with real and complex numbers. It is capable of rigorously deciding the truth of any constant relation involving algebraic numbers and many relations involving transcendental numbers, for example
Calcium is free software (LGPL). It depends on GMP, MPFR, Flint, Antic and Arb.
Source code: https://github.com/fredrik-johansson/calcium
Bug reports and feature requests: https://github.com/fredrik-johansson/calcium/issues
Mailing list: flint-devel
This documentation is available in HTML format at http://fredrikj.net/calcium/ and in PDF format at http://fredrikj.net/calcium/calcium.pdf. This edition of the documentation was updated May 28, 2021 and describes Calcium 0.4.0.
Tutorial¶
For new users, this introductory Jupyter notebook is a good place to start.
General information¶
General modules¶
Numbers¶
- ca.h – exact real and complex numbers
- Introduction: numbers
- Introduction: special values
- Number objects
- Context objects
- Memory management for numbers
- Symbolic expressions
- Printing
- Special values
- Assignment and conversion
- Conversion of algebraic numbers
- Random generation
- Representation properties
- Value predicates
- Comparisons
- Field structure operations
- Arithmetic
- Powers and roots
- Complex parts
- Exponentials and logarithms
- Trigonometric functions
- Special functions
- Numerical evaluation
- Rewriting and simplification
- Factorization
- Context options
- Internal representation
- ca_vec.h – vectors of real and complex numbers
Matrices and polynomials¶
- ca_poly.h – dense univariate polynomials over the real and complex numbers
- Types, macros and constants
- Memory management
- Assignment and simple values
- Random generation
- Input and output
- Degree and leading coefficient
- Comparisons
- Arithmetic
- Evaluation and composition
- Derivative and integral
- Power series division
- Elementary functions
- Greatest common divisor
- Roots and factorization
- Vectors of polynomials
- ca_mat.h – matrices over the real and complex numbers
- Types, macros and constants
- Memory management
- Assignment and conversions
- Random generation
- Input and output
- Special matrices
- Comparisons and properties
- Conjugate and transpose
- Arithmetic
- Powers
- Polynomial evaluation
- Gaussian elimination and LU decomposition
- Solving and inverse
- Rank and echelon form
- Determinant and trace
- Characteristic polynomial
- Eigenvalues and eigenvectors
- Jordan canonical form
- Matrix functions
Field and extension number constructions¶
These modules are used internally by the ca_t
type
to construct towers of algebraic and transcendental number fields.
The user does not normally need to use these modules directly
outside of advanced applications requiring inspection of the
symbolic representations of numbers.
Symbolic expressions¶
Basic algebraic structures¶
The following modules implement useful exact structures
independently of the ca_t
type. They are used
internally in Calcium, but the interfaces are stable and
use in appropriate external applications is encouraged.
- fmpz_mpoly_q.h – multivariate rational functions over Q
- qqbar.h – algebraic numbers represented by minimal polynomials
- Types and macros
- Memory management
- Assignment
- Properties
- Conversions
- Special values
- Input and output
- Random generation
- Comparisons
- Complex parts
- Integer parts
- Arithmetic
- Powers and roots
- Numerical enclosures
- Numerator and denominator
- Conjugates
- Polynomial evaluation
- Polynomial roots
- Roots of unity and trigonometric functions
- Guessing and simplification
- Symbolic expressions and conversion to radicals
- Internal functions
- utils_flint.h – extra methods for Flint types