PHPackages                             antonvlasenko/decimal - 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. antonvlasenko/decimal

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

antonvlasenko/decimal
=====================

An object-oriented wrapper around BC Math PHP extension

v1.0.1(6y ago)03GPL-3.0-or-laterPHPPHP &gt;=7.2CI failing

Since Dec 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/anton-vlasenko/decimal)[ Packagist](https://packagist.org/packages/antonvlasenko/decimal)[ RSS](/packages/antonvlasenko-decimal/feed)WikiDiscussions master Synced 2d ago

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

Introduction
============

[](#introduction)

`Decimal` is an object-oriented wrapper around BC Math PHP extension. It allows to use OOP when working when decimal numbers. This package also adds support for exponent numbers.

Installation
------------

[](#installation)

```
composer require antonvlasenko/decimal
```

Running tests
-------------

[](#running-tests)

```
composer run tests
```

Note: there are other useful commands available. Check `composer.json` for more information.

Example
-------

[](#example)

```
use AntonVlasenko\Decimal\Decimal;

Decimal::$SCALE = 20; // Sets precision

$decimal = new Decimal('5e2');

echo $decimal->divideBy(3);
// 166.66666666666666666666
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

2323d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbf8466a0f529d4a06a6305a4735bada1d58af338e6f5e84429cfbc5cfd37169?d=identicon)[antonvlasenko](/maintainers/antonvlasenko)

---

Top Contributors

[![anton-vlasenko](https://avatars.githubusercontent.com/u/43744263?v=4)](https://github.com/anton-vlasenko "anton-vlasenko (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/antonvlasenko-decimal/health.svg)

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

###  Alternatives

[dueros/bot-sdk

度秘bot开发的PHP SDK

7514.4k1](/packages/dueros-bot-sdk)[devitek/yaml-configuration

Add YAML file support to Laravel Configuration

1614.1k](/packages/devitek-yaml-configuration)[gabrielanhaia/php-circuit-breaker

Circuit breaker pattern for PHP with multiple storage adapters, event system, and manual override.

151.2k1](/packages/gabrielanhaia-php-circuit-breaker)

PHPackages © 2026

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