kabbouchi / bignumber
A PHP package for arbitrary-precision decimal and non-decimal arithmetic inspired by bignumber.js
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/kabbouchi/bignumber
Requires
- php: ^8.0
- ext-bcmath: *
- brick/math: ^0.9.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6.0
- mockery/mockery: ^1.5.0
- pestphp/pest: ^2.0.0
- phpstan/phpstan: ^1.4.6
- symfony/var-dumper: ^5.4.3
README
A PHP package for arbitrary-precision decimal and non-decimal arithmetic inspired by bignumber.js
Installation
composer require kabbouchi/bignumber
Usage
use KABBOUCHI\BigNumber; BigNumber::of(123)->plus(12)->div(1234)->toString(); BigNumber::of(1) ->div(5) ->times(BigNumber::of(10)->pow(9)) ->div(1.453) ->negated() ->abs() ->toFixed(4);
License
The MIT License (MIT). Please see License File for more information.