This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
1.2.0
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.