This library is a slightly streamlined remake of the php-decimal library
The PHP language only offers two numeric data types: int and float. Neither of these types are suitable for a substantial set of real-world problems, where exact arithmetic with values of arbitrary precision are required -- notably, when working with monetary values.
PHP's optional extension BCMath provides some limited features in this area, but it is awkward to use when precision is variable, and it does not support rounding.
This library uses the BCMath functions internally, but hides them behind a more convenient, object-oriented, and intuitive API.
using composer: composer require konekt/decimal