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

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

enimiste/math
=============

Math calculation, number representation package

v1.0.1(9y ago)01931MITPHPPHP &gt;=5.5

Since Jul 21Pushed 9y ago1 watchersCompare

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

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

\#Financial number manipulation in PHP The aim of this package is to facilitate the manipulation and calculs on float numbers without errors.

\##Class Number This is an abstract class for all math numbers. This class preserve the original value from what the number is created. Numbers can be compared : `lt, le, ge, ge, equals` to other numbers (implementing Number class) or PHP Scalar numbers.

\##Class IntegerNumber Represents an integer number. You can create new integers from strings, float and pure integer values. NB: conversion from float to integer is used with round :

- `1.2` ==&gt; `1`
- `1.5` ==&gt; `1`
- `1.6` ==&gt; `2`

\####Examples

```
$ints[] = new Enimiste\Math\VO\IntegerNumber(1);

$ints[] = new Enimiste\Math\VO\IntegerNumber(1.0);

$ints[] = new Enimiste\Math\VO\IntegerNumber('1');

$ints[] = new Enimiste\Math\VO\IntegerNumber(1.39);

$ints[] = new Enimiste\Math\VO\IntegerNumber(1.7);

$ints[] = new Enimiste\Math\VO\IntegerNumber(-3);
```

The code below :

```
foreach($ints as $x) {
    echo $x->getValue();
    echo $x->getOrigin();
    echo $x->__toString();
}
```

will output the results :

- `1` | `1` | `"1"`
- `1` | `1.0` | `"1"`
- `1` | `"1"` | `"1"`
- `1` | `1.39` | `"1"`
- `2` | `1.7` | `"2"`
- `-3` | `-3` | `"-3"`

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

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 ~186 days

Total

2

Last Release

3446d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.0.1PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/43e7310829d4711c88c34476daec986374515494fa1db2893f33d9091cc25a1a?d=identicon)[nouni.elbachir](/maintainers/nouni.elbachir)

---

Top Contributors

[![enimiste](https://avatars.githubusercontent.com/u/2515677?v=4)](https://github.com/enimiste "enimiste (12 commits)")

---

Tags

laravelmathnumberfloatpriceTVAfinancial

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[firefly-iii/data-importer

Firefly III Data Import Tool.

8005.8k](/packages/firefly-iii-data-importer)[hekmatinasser/notowo

This Package helps developers change number to word for all language on Laravel freamwork PHP

32530.1k2](/packages/hekmatinasser-notowo)[hnhdigital-os/laravel-number-converter

Number to word, roman, ordinal converter

19167.0k2](/packages/hnhdigital-os-laravel-number-converter)

PHPackages © 2026

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