Skip to content

Releases: brick/math

0.7.1

01 Mar 12:38
Compare
Choose a tag to compare

This is a maintenance release, no code has been changed.

  • When installed with --no-dev, the autoloader does not autoload tests anymore
  • Tests and other files unnecessary for production are excluded from the dist package

This will help make installations more compact.

0.7.0

02 Oct 19:22
Compare
Choose a tag to compare

Methods renamed:

  • BigNumber:sign() has been renamed to getSign()
  • BigDecimal::unscaledValue() has been renamed to getUnscaledValue()
  • BigDecimal::scale() has been renamed to getScale()
  • BigDecimal::integral() has been renamed to getIntegral()
  • BigDecimal::fraction() has been renamed to getFraction()
  • BigRational::numerator() has been renamed to getNumerator()
  • BigRational::denominator() has been renamed to getDenominator()

Classes renamed:

  • ArithmeticException has been renamed to MathException

0.6.2

02 Oct 17:50
Compare
Choose a tag to compare

The base class for all exceptions is now MathException.
ArithmeticException has been deprecated, and will be removed in 0.7.0.

0.6.1

02 Oct 17:40
Compare
Choose a tag to compare

A number of methods have been renamed:

  • BigNumber:sign() is deprecated; use getSign() instead
  • BigDecimal::unscaledValue() is deprecated; use getUnscaledValue() instead
  • BigDecimal::scale() is deprecated; use getScale() instead
  • BigDecimal::integral() is deprecated; use getIntegral() instead
  • BigDecimal::fraction() is deprecated; use getFraction() instead
  • BigRational::numerator() is deprecated; use getNumerator() instead
  • BigRational::denominator() is deprecated; use getDenominator() instead

The old methods will be removed in version 0.7.0.

0.6.0

25 Aug 10:33
Compare
Choose a tag to compare
  • Minimum PHP version is now 7.1; for PHP 5.6 and PHP 7.0 support, use version 0.5
  • Deprecated method BigDecimal::withScale() has been removed; use toScale() instead
  • Method BigNumber::toInteger() has been renamed to toInt()

0.5.4

17 Oct 22:23
Compare
Choose a tag to compare

BigNumber classes now implement JsonSerializable.
The JSON output is always a string.

0.5.3

31 Mar 17:05
Compare
Choose a tag to compare

This is a bugfix release. Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.

0.4.3

31 Mar 17:28
Compare
Choose a tag to compare

Backport of two bug fixes from the 0.5 branch:

  • BigInteger::parse() did not always throw InvalidArgumentException as expected
  • Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.

0.3.5

31 Mar 18:02
Compare
Choose a tag to compare

Backport of two bug fixes from the 0.5 branch:

  • BigInteger::parse() did not always throw InvalidArgumentException as expected
  • Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.

0.5.2

06 Aug 11:12
Compare
Choose a tag to compare

The $scale parameter of BigDecimal::dividedBy() is now optional again.