PHPackages                             thelia/math-tools - 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. thelia/math-tools

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

thelia/math-tools
=================

Number management library

1.0.2(10y ago)097.6k↑93.2%2[1 issues](https://github.com/thelia/math-tools/issues)1LGPLPHP

Since Nov 7Pushed 10y ago2 watchersCompare

[ Source](https://github.com/thelia/math-tools)[ Packagist](https://packagist.org/packages/thelia/math-tools)[ RSS](/packages/thelia-math-tools/feed)WikiDiscussions master Synced 1mo ago

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

Maths tools
===========

[](#maths-tools)

This library includes some tools for math operations.

[![Build Status](https://camo.githubusercontent.com/ea99f8384beff14b489af4228e4fb7f5f0e49cbcd3fd122434497c921b2bc877/68747470733a2f2f7472617669732d63692e6f72672f7468656c69612f6d6174682d746f6f6c732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/thelia/math-tools) [![License](https://camo.githubusercontent.com/75f5589329209fc051f3365ff56ceb9bbdbb4790a5786a49cb9671834ae14a20/68747470733a2f2f706f7365722e707567782e6f72672f7468656c69612f6d6174682d746f6f6c732f6c6963656e73652e706e67)](https://packagist.org/packages/thelia/math-tools) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/e1e15a7cc8b9df14357ccb1683a96e4c7f54601facf9ddebedaa55571760d00b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468656c69612f6d6174682d746f6f6c732f6261646765732f7175616c6974792d73636f72652e706e673f733d36316533653034613639626666643731633239623038653533393230383033313761353436373136)](https://scrutinizer-ci.com/g/thelia/math-tools/)

Number
------

[](#number)

Here's an example of rounding problems solved by this lib:

```
$price = new Number('3.99');

$price->divide('1.2');
echo $price->getNumber(); // 3.33

$price->multiply('1.2');
echo $price->getNumber(); // 3.99, where most of time libs returns 4.00
```

GCD
---

[](#gcd)

This tool computes the GCD of two numbers.

```
echo GCD::getGCD(10,5); // 5
echo GCD::getGCD(10,10); // 10
echo GCD::getGCD(20,10); // 10
echo GCD::getGCD(11,10); // 1
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Every ~181 days

Total

3

Last Release

3847d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2196919?v=4)[thelia](/maintainers/thelia)[@thelia](https://github.com/thelia)

---

Top Contributors

[![gillesbourgeat](https://avatars.githubusercontent.com/u/7335734?v=4)](https://github.com/gillesbourgeat "gillesbourgeat (7 commits)")[![lovenunu](https://avatars.githubusercontent.com/u/6106094?v=4)](https://github.com/lovenunu "lovenunu (5 commits)")[![lunika](https://avatars.githubusercontent.com/u/767834?v=4)](https://github.com/lunika "lunika (1 commits)")[![roadster31](https://avatars.githubusercontent.com/u/2197734?v=4)](https://github.com/roadster31 "roadster31 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thelia-math-tools/health.svg)

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

PHPackages © 2026

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