PHPackages                             scorpiot1000/complex-base - 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. scorpiot1000/complex-base

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

scorpiot1000/complex-base
=========================

Complex numbers base operations

0.6.1(5y ago)07MITPHPPHP &gt;=7.1.0

Since Sep 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ScorpioT1000/complex-base)[ Packagist](https://packagist.org/packages/scorpiot1000/complex-base)[ Docs](https://github.com/ScorpioT1000/complex-base)[ RSS](/packages/scorpiot1000-complex-base/feed)WikiDiscussions master Synced 1w ago

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

complex-base
============

[](#complex-base)

Complex numbers base operations

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

[](#installation)

```
    composer require scorpiot1000/complex-base 0.*@dev

```

Usage
=====

[](#usage)

```
    use ScorpioT1000\ComplexBase\Complex\Form\Complex;
    use ScorpioT1000\ComplexBase\Complex\Form\ComplexTrigonometric;

    ...

    $a = new Complex(4, 4);
    $b = new Complex(2, 2);

    echo 'a = '. $a . PHP_EOL;
    echo 'b = '. $b . PHP_EOL;

    echo '-a = '.$a->negative() . PHP_EOL;
    echo 'a + b = '.$a->add($b) . PHP_EOL;
    echo 'a - b = '.$a->sub($b) . PHP_EOL;
    echo 'a * b = '.$a->mul($b) . PHP_EOL;
    echo 'a / b = '.$a->div($b) . PHP_EOL;

    $aTrig = $a->toTrigonometric();

    echo $aTrig;
    echo $aTrig->add(new ComplexTrigonometric(0, M_PI)); // rotate 180deg
```

Run tests
=========

[](#run-tests)

Just execute `phpunit` binary from the document root

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

7

Last Release

2050d ago

### Community

Maintainers

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

---

Top Contributors

[![ScorpioT1000](https://avatars.githubusercontent.com/u/1327866?v=4)](https://github.com/ScorpioT1000 "ScorpioT1000 (11 commits)")

---

Tags

math

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scorpiot1000-complex-base/health.svg)

```
[![Health](https://phpackages.com/badges/scorpiot1000-complex-base/health.svg)](https://phpackages.com/packages/scorpiot1000-complex-base)
```

###  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)
