Skip to content

0.18.0

Latest

Choose a tag to compare

@BenMorel BenMorel released this 14 Jun 18:50

πŸ’₯ Breaking changes

The following breaking change only affects you if you're using named arguments:

  • BigInteger::fromBytes() now uses $bytes as the parameter name

πŸ› Bug fixes

  • of() no longer accepts a trailing newline (\n) in the input string; such input now throws NumberFormatException
  • of() now consistently throws NumberFormatException for exponents too large to process, instead of IntegerOverflowException in some cases
  • BigInteger::fromBase() now reports the invalid character with its original case in the NumberFormatException message, instead of lower-casing it

⚑️ Performance improvements

  • BigInteger::gcd() no longer exhausts memory on large inputs when the GMP extension is not installed
  • BigInteger::modInverse() no longer exhausts memory on large inputs, and is faster when the GMP extension is not installed

πŸ‘Œ Static analysis improvements

  • Narrowed parameter and return types with static analysis annotations:
    • nthRoot()'s $n is now positive-int
    • BigInteger::toBase(), toArbitraryBase(), toBytes() and BigRational::toRepeatingDecimalString() now return non-empty-string