All Versions
48
Latest Version
Avg Release Cycle
50 days
Latest Release
320 days ago

Changelog History
Page 2

  • v0.8.10 Changes

    January 21, 2020

    ๐Ÿ†• โœจ New feature

    BigInteger::mod() returns the modulo of two numbers. The modulo differs from the remainder when the signs of the operands are different.

  • v0.8.9 Changes

    January 08, 2020

    ๐ŸŽ โšก๏ธ Performance improvements

    A few additional optimizations in BigInteger and BigDecimal when one of the operands can be returned as is. Thanks to @tomtomsen in #24.

  • v0.8.8 Changes

    April 25, 2019

    ๐Ÿ› ๐Ÿ› Bug fixes

    • BigInteger::toBase() could return an empty string for zero values (BCMath & Native calculators only, GMP calculator unaffected)

    ๐Ÿ†• โœจ New features

    • BigInteger::toArbitraryBase() converts a number to an arbitrary base, using a custom alphabet
    • BigInteger::fromArbitraryBase() converts a string in an arbitrary base, using a custom alphabet, back to a number

    These methods can be used as the foundation to convert strings between different bases/alphabets, using BigInteger as an intermediate representation.

    ๐Ÿ—„ ๐Ÿ’ฉ Deprecations

    • ๐Ÿ—„ BigInteger::parse() is now deprecated in favour of fromBase()

    ๐Ÿ“œ BigInteger::fromBase() works the same way as parse(), with 2 minor differences:

    • 0๏ธโƒฃ the $base parameter is required, it does not default to 10
    • it throws a NumberFormatException instead of an InvalidArgumentException when the number is malformed
  • v0.8.7 Changes

    April 20, 2019

    Improvements

    • Safer conversion from float when using custom locales
    • Much faster NativeCalculator implementation ๐Ÿš€

    ๐ŸŽ You can expect at least a 3x performance improvement for common arithmetic operations when using the library on systems without GMP or BCMath; it gets exponentially faster on multiplications with a high number of digits. This is due to calculations now being performed on whole blocks of digits (the block size depending on the platform, 32-bit or 64-bit) instead of digit-by-digit as before.

  • v0.8.6 Changes

    April 11, 2019

    New method

    BigNumber::sum() returns the sum of one or more numbers.

  • v0.8.5 Changes

    February 12, 2019

    ๐Ÿ› Bug fix: of() factory methods could fail when passing a float in environments using a LC_NUMERIC locale with a decimal separator other than '.' (#20).

    Thanks @manowark ๐Ÿ‘

  • v0.8.4 Changes

    December 07, 2018

    ๐Ÿ†• New method

    BigDecimal::sqrt() calculates the square root of a decimal number, to a given scale.

  • v0.8.3 Changes

    December 06, 2018

    ๐Ÿ†• New method

    BigInteger::sqrt() calculates the square root of a number (thanks @peter279k).

    ๐Ÿ†• New exception

    NegativeNumberException is thrown when calling sqrt() on a negative number.

  • v0.8.2 Changes

    November 08, 2018

    ๐ŸŽ Performance update

    • ๐ŸŽ Further improvement of toInt() performance
    • NativeCalculator can now perform some multiplications more efficiently
  • v0.8.1 Changes

    November 07, 2018

    ๐ŸŽ Performance optimization of toInt() methods.