josecelano/php-complex

There is no license information available for the latest version (1.1.1) of this package.

PHP Complex class implemented with arbitrary-precision decimal arithmetic

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 2

pkg:composer/josecelano/php-complex

1.1.1 2020-04-17 16:41 UTC

This package is auto-updated.

Last update: 2025-09-18 06:07:42 UTC


README

I'm working on a PHP Fractal kata:

PHP Mandelbrot Kata

In order to get be able to zoom in the final Mandelbrot Set image as much as I want I need arbitrary precision for some complex number operations. In this package I'have implemented only the operations needed.

This is the arbitrary precision package being used:

php-decimal.io

Prerequisites

  • PHP 7.4

Installation

docker build -t php-complex .
docker run -it --rm \
	-v "$PWD":/usr/src/app \
	-w /usr/src/app \
	-u $(id -u ${USER}):$(id -g ${USER}) \
	php-complex \
    composer install

Running the tests

docker run -it --rm \
	-v "$PWD":/usr/src/app \
	-w /usr/src/app \
	-u $(id -u ${USER}):$(id -g ${USER}) \
	php-complex

Acknowledgments

TODO

  • Allow to define precision for each complex instance