phpmath / biginteger
A PHP library to work with big integers.
Installs: 3 562
Dependents: 1
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 4
Open Issues: 1
Requires
- php: ~7.0
- ext-gmp: *
Requires (Dev)
- phpunit/phpunit: ^5.6
- squizlabs/php_codesniffer: ^2.7
This package is not auto-updated.
Last update: 2024-11-02 04:51:28 UTC
README
A PHP library to work with big integers. This library makes use of the GMP extension to do its calculations.
Install
Via Composer
$ composer require phpmath/biginteger
Usage
use PHP\Math\BigInteger\BigInteger; $number = new BigInteger('8273467836243255543265432745');
Features
This library supports the following operations:
- Basic operations such as add, divide, multiply and subtract.
- Performing modulo operations.
- Calculate the square root and power of values.
- Negate numbers
- Make numbers absolute.
- Compare numbers
Beside these operations it's also possible to make the object mutable or immutable. Performing operations on an immutable number results in the function returning a new instance.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please create an issue in the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.