PHPackages                             greenimp/php-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. greenimp/php-math

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

greenimp/php-math
=================

A basic set of math scripts that deal in strings to handle long floating point values.

v1.0.1(3y ago)0116MITPHPPHP ^8.0|8.1|8.2

Since Dec 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/GreenImp/php-math)[ Packagist](https://packagist.org/packages/greenimp/php-math)[ RSS](/packages/greenimp-php-math/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

php-math
========

[](#php-math)

A basic set of math scripts that deal in strings to handle long floating point values.

Internally, this uses PHP's [BC Math](https://www.php.net/manual/en/book.bc.php) functions, and [moneyphp](https://moneyphp.org)'s BcMathCalculator.

The main difference from MoneyPhp is that MoneyPhp's `round()` method always rounds to an integer, whereas this library can round to a chosen precision as well.

It also adds a few extra functions, such as `sum()` which will sum an iterable of numbers.

Setup
-----

[](#setup)

```
composer require GreenImp/PhpMath
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

2

Last Release

1255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/130eb7df1488b1339ca1e475238a52e318e5e844e4ed7e5d73a61a060dd0f148?d=identicon)[GreenImp](/maintainers/GreenImp)

---

Top Contributors

[![GreenImp](https://avatars.githubusercontent.com/u/1846676?v=4)](https://github.com/GreenImp "GreenImp (3 commits)")

### Embed Badge

![Health badge](/badges/greenimp-php-math/health.svg)

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

###  Alternatives

[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[vyuldashev/nova-money-field

A Laravel Nova field for Money.

73784.4k1](/packages/vyuldashev-nova-money-field)[leandrocfe/filament-ptbr-form-fields

Brazilian pt-BR form fields.

14398.7k](/packages/leandrocfe-filament-ptbr-form-fields)[pelmered/filament-money-field

94162.4k1](/packages/pelmered-filament-money-field)[serendipity_hq/component-value-objects

A set of value objects to manage simple and composite values

20558.6k4](/packages/serendipity-hq-component-value-objects)

PHPackages © 2026

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