This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
Releases: ramsey/moontoast-math
Releases · ramsey/moontoast-math
1.2.1
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.
1.1.2
- Fix issue where
convertToBase10()
andconvertFromBase10()
returned incorrect results if the globalbcmath.scale
value was set to something other than zero. See ramsey/uuid#150.