PHPackages                             dwzi/class-math - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dwzi/class-math

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dwzi/class-math
===============

Class for Arbitrary Precision Mathematics

0.2(7y ago)010BSD-3-ClausePHPPHP ^7

Since Aug 24Pushed 7y agoCompare

[ Source](https://github.com/dwzi/class-math)[ Packagist](https://packagist.org/packages/dwzi/class-math)[ Docs](https://github.com/dwzi/class-math)[ RSS](/packages/dwzi-class-math/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Class for Arbitrary Precision Mathematics
=========================================

[](#class-for-arbitrary-precision-mathematics)

Classes
-------

[](#classes)

- Math (PHP functions)
- MathBCMath (PHP bcmath extension)

Parameters
----------

[](#parameters)

- Pre Decimals
- Decimals
- Fill Character for Pre Decimals
- Comma
- Seperator

Functions
---------

[](#functions)

- Value Format
- Addition
- Subtraction
- Multiplication
- Division
- Modulo
- Exponentiation with Base and Exponent
- Logarithm with Base and Antilogarithm
- nth Root with Degree and Radicand
- Square Root
- Compare
- Absolute
- Round
- Round Up
- Round Down

Tests
-----

[](#tests)

$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/MathTest
$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/MathBCMathTest

Credits
-------

[](#credits)

[![DWZI GmbH](https://camo.githubusercontent.com/991890ae0fad6657f5437258c5a2db0e1670a6951d5e8c11e2f9172f0593def5/68747470733a2f2f64777a692e61742f6c6f676f2f6c6f676f5f64777a695f313530783135302e706e67)](https://camo.githubusercontent.com/991890ae0fad6657f5437258c5a2db0e1670a6951d5e8c11e2f9172f0593def5/68747470733a2f2f64777a692e61742f6c6f676f2f6c6f676f5f64777a695f313530783135302e706e67)
DWZI GmbH
[![https://dwzi.at](https://camo.githubusercontent.com/273464d18a4c91ffdf329e65356bde8a30f47bd76f2dbbc82e647e70e60ecbc7/68747470733a2f2f64777a692e6174)](https://camo.githubusercontent.com/273464d18a4c91ffdf329e65356bde8a30f47bd76f2dbbc82e647e70e60ecbc7/68747470733a2f2f64777a692e6174)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2821d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/040eb2c1a30a8023756fc402565d4a59d3b9f6269f387189c21d2aa181395b38?d=identicon)[tom-dwzi](/maintainers/tom-dwzi)

---

Top Contributors

[![tom-dwzi](https://avatars.githubusercontent.com/u/42621014?v=4)](https://github.com/tom-dwzi "tom-dwzi (13 commits)")

---

Tags

arbitrary-precision-mathematicsdwzimathematicsprecisionarbitrarydwzi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dwzi-class-math/health.svg)

```
[![Health](https://phpackages.com/badges/dwzi-class-math/health.svg)](https://phpackages.com/packages/dwzi-class-math)
```

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M277](/packages/brick-math)[markbaker/complex

PHP Class for working with complex numbers

1.7k283.1M38](/packages/markbaker-complex)[markbaker/matrix

PHP Class for working with matrices

1.5k279.7M38](/packages/markbaker-matrix)[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[aza/math

AzaMath - Anizoptera CMF mathematic component. Arbitrary precision arithmetic (for huge integers; BCMath wrapper) and universal convertor between positional numeral systems (supported bases from 2 to 62 inclusive, and systems with custom alphabet; pure PHP realisation, can use GMP and core PHP functions for speed optimization).

1921.9k1](/packages/aza-math)[php-decimal/php-decimal

Correctly-rounded arbitrary precision decimal floating point

781.0M9](/packages/php-decimal-php-decimal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
