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

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

heartsentwined/math
===================

A collection of math functions.

v2.0.4(9y ago)022ISCPHPPHP &gt;=5.3.3

Since Sep 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/heartsentwined/php-math)[ Packagist](https://packagist.org/packages/heartsentwined/math)[ Docs](https://github.com/yalesov/php-math)[ RSS](/packages/heartsentwined-math/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Yalesov\\Math
=============

[](#yalesovmath)

[![Build Status](https://camo.githubusercontent.com/08f1369e68ad7355a292be7e9ff00aa8bc9544c56311887c0f033107fd7c56e2/68747470733a2f2f7472617669732d63692e6f72672f79616c65736f762f7068702d6d6174682e737667)](https://travis-ci.org/yalesov/php-math)

A collection of math functions.

Installation
============

[](#installation)

[Composer](http://getcomposer.org/):

```
{
  "require": {
    "yalesov/math": "2.*"
  }
}
```

Usage
=====

[](#usage)

roundUp
-------

[](#roundup)

Round a `$number` up to a certain `$precision`:

```
use Yalesov\Math\Math;
Math::roundUp($number, $precision);
```

`$number`: any numeric scalar `$precision`: follows PHP's [round](http://php.net/manual/en/function.round.php) function, i.e.

- `2` = two decimal places
- `-2` = neartest hundreds

getDecimalPlace
---------------

[](#getdecimalplace)

Get the number of decimal places:

```
use Yalesov\Math\Math;
$dp = Math::getDecimalPlace(0.123456789); // $dp = 9
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~0 days

Total

8

Last Release

3598d ago

Major Versions

1.0.2 → v2.0.02016-07-05

### Community

Maintainers

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

---

Top Contributors

[![yalesov](https://avatars.githubusercontent.com/u/20264293?v=4)](https://github.com/yalesov "yalesov (8 commits)")

---

Tags

math

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M277](/packages/brick-math)[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)[mathjax/mathjax

MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

10.8k90.8k1](/packages/mathjax-mathjax)[phpseclib/bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension

16720.7M17](/packages/phpseclib-bcmath-compat)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[jlawrence/eos

Parse and solve math equations without using 'eval()'.

1071.1M11](/packages/jlawrence-eos)

PHPackages © 2026

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