Open
Conversation
Contributor
Author
|
c6759f4 to
bf212c6
Compare
bf212c6 to
a66b7b9
Compare
a66b7b9 to
adfa5b5
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
^0.14.8→^0.15.0Release Notes
brick/math (brick/math)
v0.15.0Compare Source
💥 Breaking changes
of()and arithmetic methods, useof((string) $float)to get the same behaviour as before (#105)BigRationalis now always simplified to lowest terms: all operations, includingof()andofFraction(), now return a fraction in its simplest form (e.g.2/3instead of4/6)BigDecimal::dividedBy()now requires the$scaleparameterBigInteger::sqrt()andBigDecimal::sqrt()now default toRoundingMode::Unnecessary, explicitly passRoundingMode::Downto get the previous behaviourBigInteger::mod()now uses Euclidean modulo semantics: the modulus must be strictly positive, and the result is always non-negative; this change aligns with Java'sBigInteger.mod()behaviourBigInteger::mod(),modInverse()andmodPow()now throwInvalidArgumentException(instead ofNegativeNumberException) for negative modulus/exponent argumentsMathExceptionis now an interface instead of a classBigDecimal::getPrecision()now returns1for zero valuesBigNumber::min(),max()andsum()now throw anArgumentCountErrorwhen called with no arguments (previously threwInvalidArgumentException)BigInteger::randomBits()andrandomRange()now throwRandomSourceExceptionwhen random byte generation fails or returns invalid dataDeprecated API elements removed:
BigInteger::testBit()has been removed, useisBitSet()insteadBigInteger::gcdMultiple()has been removed, usegcdAll()insteadBigDecimal::exactlyDividedBy()has been removed, usedividedByExact()insteadBigDecimal::getIntegralPart()has been removed (will be re-introduced as returningBigIntegerin 0.16)BigDecimal::getFractionalPart()has been removed (will be re-introduced as returningBigDecimalwith a different meaning in 0.16)BigDecimal::stripTrailingZeros()has been removed, usestrippedOfTrailingZeros()insteadBigRational::nd()has been removed, useofFraction()insteadBigRational::quotient()has been removed, usegetIntegralPart()insteadBigRational::remainder()has been removed, use$number->getNumerator()->remainder($number->getDenominator())insteadBigRational::quotientAndRemainder()has been removed, use$number->getNumerator()->quotientAndRemainder($number->getDenominator())insteadRoundingModeupper snake case constants (e.g.HALF_UP) have been removed, use the pascal case version (e.g.HalfUp) insteadThe following breaking changes only affect you if you're using named arguments:
BigInteger::mod()now uses$modulusas the parameter nameBigInteger::modInverse()now uses$modulusas the parameter nameBigInteger::modPow()now uses$exponentand$modulusas parameter namesBigInteger::shiftedLeft()now uses$bitsas the parameter nameBigInteger::shiftedRight()now uses$bitsas the parameter nameBigInteger::isBitSet()now uses$bitIndexas the parameter nameBigInteger::randomBits()now uses$bitCountas the parameter nameBigDecimal::withPointMovedLeft()now uses$placesas the parameter nameBigDecimal::withPointMovedRight()now uses$placesas the parameter nameThe following breaking changes are unlikely to affect you:
DivisionByZeroException::modulusMustNotBeZero()has been renamed tozeroModulus()DivisionByZeroException::denominatorMustNotBeZero()has been renamed tozeroDenominator()IntegerOverflowException::toIntOverflow()has been renamed tointegerOutOfRange()RoundingNecessaryException::roundingNecessary()has been removed🗑️ Deprecations
BigRational::simplified()is deprecated, as it is now a no-op✨ New features
BigInteger::power(),BigDecimal::power()andBigRational::power()no longer enforce an exponent limitBigInteger::shiftedLeft()andBigInteger::shiftedRight()no longer enforce a limit on the number of bitsBigRational::power()now accepts negative exponentsInvalidArgumentExceptionfor invalid argument errorsNoInverseExceptionfor modular inverse errorsRandomSourceExceptionfor random source errors👌 Improvements
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.