greenimp / php-math
A basic set of math scripts that deal in strings to handle long floating point values.
v1.0.1
2022-12-07 23:26 UTC
Requires
- php: ^8.0|8.1|8.2
- moneyphp/money: ^v4.0.5
README
A basic set of math scripts that deal in strings to handle long floating point values.
Internally, this uses PHP's BC Math functions, and moneyphp's BcMathCalculator.
The main difference from MoneyPhp is that MoneyPhp's round()
method always rounds to an integer, whereas this library can round to a chosen precision as well.
It also adds a few extra functions, such as sum()
which will sum an iterable of numbers.
Setup
composer require GreenImp/PhpMath