phpmath/biginteger
Integers of any size, built on the GMP extension.
composer require phpmath/biginteger
Big numbers, fractions, vectors, matrices and more. Every library is immutable, fully tested and built to the same standard, so they all work the same way.
Browse libraries View on GitHub// Arbitrary-precision integers, always immutable use PHPMath\BigInteger\BigInteger; $a = new BigInteger('12345678901234567890'); $b = new BigInteger('98765432109876543210'); echo $a->add($b)->value(); // 111111111011111111100
Twelve libraries, one standard. Each installs through Composer.
No libraries match your search.
Integers of any size, built on the GMP extension.
composer require phpmath/biginteger
Numbers of any size and precision, including decimals.
composer require phpmath/bignumber
Exact rational numbers that never lose precision.
composer require phpmath/fraction
Vectors in two and three dimensions: dot and cross products, scaling and normalization.
composer require phpmath/vector
Matrices with arithmetic, determinants, inverses and transposes.
composer require phpmath/matrix
Complex numbers with polar form, powers and roots.
composer require phpmath/complex
Quaternions for 3D rotation, with axis-angle and slerp.
composer require phpmath/quaternion
Polynomials with arithmetic, evaluation, derivatives and roots.
composer require phpmath/polynomial
Primes, factorization, modular arithmetic and the Chinese remainder theorem.
composer require phpmath/number-theory
Descriptive statistics, the normal distribution and linear regression.
composer require phpmath/statistics
Points, lines, circles, rectangles and polygons.
composer require phpmath/geometry
The shared coding standard every phpmath library follows.
composer require --dev phpmath/coding-standard
What every phpmath library commits to.
The same coding standard, structure, naming and documentation everywhere.
Only supported PHP versions, with strict types and native type declarations.
Unit tests, coverage and static analysis run on every change.
Every number, vector and matrix is an immutable value object, always safe to share.
Found a bug or want a feature? Open an issue or pull request on the library's repository. Changes that follow the shared coding standard and include tests are very welcome.
Visit the organization