Released: 2020-01-04
- Package is abandoned. Please transition to brick/math.
Released: 2020-01-04
- Optimize algorithm for conversion from base-10 numbers
- Simplify the algorithm for absolute value.
- Introduce
BigNumberInterface
- Introduce
AbstractBigNumber
implementingBigNumberInterface
, to extract common code (mainly convenience and static methods). - Introduce
BigNumberImmutable
, extendingAbstractBigNumber
and composing a mutableBigNumber
. - Make
BigNumber
extendAbstractBigNumber
. - Remove dependency on ext-bcmath.
There is a subtle difference in how BigNumberImmutable
works in respect to
BigNumber
when using withScale
method instead of setScale
:
When invoking BigNumberImmutable::withScale()
, the new instance will have the
new value re-computed according to the new scale. With BigNumber::setScale()
instead, the change doesn't happen until subsequent computations.
Released: 2017-02-16
- Fix issue where
convertToBase10()
andconvertFromBase10()
returned incorrect results if the globalbcmath.scale
value was set to something other than zero. See ramsey/uuid#150.
Released: 2016-11-17
- Updated from PSR-0 to PSR-4 standard
- Fix failing tests on PHP 7
- Miscellaneous build and test improvements
- Removed the
docs/
directory
Released: 2013-01-19
- Break: Division by zero now throws
\Moontoast\Math\Exception\ArithmeticException
instead of\InvalidArgumentException
- Regenerated API documentation to include
\Moontoast\Math\Exception\ArithmeticException
Released: 2013-01-16
- Changed copyright name.
Released: 2013-01-10
- Initial release