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

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

xp-framework/math
=================

Big number handling

v10.0.0(9mo ago)0143.4k↑15.6%4BSD-3-ClausePHPPHP &gt;=7.4.0CI passing

Since Dec 8Pushed 9mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (13)Used By (4)

Math
====

[](#math)

[![Build status on GitHub](https://github.com/xp-framework/math/workflows/Tests/badge.svg)](https://github.com/xp-framework/math/actions)[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)[![Requires PHP 7.4+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_4plus.svg)](http://php.net/)[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/88294d2536fa80abe5c8c0df08caf16103236091548978bbdb83f2a25f7541ad/68747470733a2f2f706f7365722e707567782e6f72672f78702d6672616d65776f726b2f6d6174682f76657273696f6e2e737667)](https://packagist.org/packages/xp-framework/math)

Big number handling

API: BigInt
-----------

[](#api-bigint)

```
public class math.BigInt extends math.BigNum {
  public math.BigInt __construct(int|float|string|parent $in)

  public math.BigNum add(int|float|string|parent $other)
  public math.BigNum subtract(int|float|string|parent $other)
  public math.BigNum multiply(int|float|string|parent $other)
  public math.BigNum divide(int|float|string|parent $other)
  public math.BigNum add0(int|float|string|parent $other)
  public math.BigNum subtract0(int|float|string|parent $other)
  public math.BigNum multiply0(int|float|string|parent $other)
  public math.BigNum divide0(int|float|string|parent $other)
  public math.BigNum power(int|float|string|parent $other)
  public math.BigNum modulo(int|float|string|parent $other)
  public math.BigNum bitwiseAnd(int|float|string|parent $other)
  public math.BigNum bitwiseOr(int|float|string|parent $other)
  public math.BigNum bitwiseXor(int|float|string|parent $other)
  public math.BigNum shiftRight(int|float|string|parent $shift)
  public math.BigNum shiftLeft(int|float|string|parent $shift)
  public int byteValue()
  public int intValue()
  public float floatValue()
}
```

API: BigFloat
-------------

[](#api-bigfloat)

```
public class math.BigFloat extends math.BigNum {
  public math.BigFloat __construct(int|float|string|parent $in)

  public math.BigNum add(int|float|string|parent $other)
  public math.BigNum subtract(int|float|string|parent $other)
  public math.BigNum multiply(int|float|string|parent $other)
  public math.BigNum divide(int|float|string|parent $other)
  public math.BigNum power(int|float|string|parent $other)
  public math.BigFloat ceil()
  public math.BigFloat floor()
  public math.BigFloat round([int $precision= 0])
  public int compare(int|float|string|parent $other, ?int $precision= null)
  public bool equals(int|float|string|parent $other, ?int $precision= null)
  public int intValue()
  public float floatValue()
}
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance58

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

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

Recently: every ~309 days

Total

12

Last Release

276d ago

Major Versions

v6.6.0 → v7.0.02016-02-21

v7.1.0 → v8.0.02017-05-29

v8.0.1 → v9.0.02020-04-10

v9.3.0 → v10.0.02025-08-16

PHP version history (4 changes)v6.6.0PHP &gt;=5.5.0

v8.0.0PHP &gt;=5.6.0

v9.0.0PHP &gt;=7.0.0

v10.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d18d882c8b4aaf3466432f64018214f2771eda333202175431ee7233795376?d=identicon)[thekid](/maintainers/thekid)

---

Top Contributors

[![thekid](https://avatars.githubusercontent.com/u/696742?v=4)](https://github.com/thekid "thekid (62 commits)")

---

Tags

bcmathphpxp-frameworkmodulexp

### Embed Badge

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

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

PHPackages © 2026

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