Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

1.2.0

Compare
Choose a tag to compare
@ramsey ramsey released this 05 Jan 04:36
· 2 commits to master since this release
1.2.0
a3ad456

Released: 2020-01-04

  • Optimize algorithm for conversion from base-10 numbers
  • Simplify the algorithm for absolute value.
  • Introduce BigNumberInterface
  • Introduce AbstractBigNumber implementing BigNumberInterface, to
    extract common code (mainly convenience and static methods).
  • Introduce BigNumberImmutable, extending AbstractBigNumber and composing
    a mutable BigNumber.
  • Make BigNumber extend AbstractBigNumber.
  • 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.