Releases: markrogoyski/math-php
Releases · markrogoyski/math-php
v2.13.0
New Features
- Matrix
columnAddScalar - Matrix
columnSubtract - Matrix
columnSubtractScalar - Matrix
columnDivide
Bug Fixes
- Algebra::quadratic returns empty array when a=0 and b=0 (Previously would divide by zero)
- Trigonometry::unitCircle division by zero error for single-point.
- SampleData\People
getShoeSizehas a typo and wasgetShowSize. This has been fixed. - Fixed calculation in Probability\Distribution\Discrete\Hypergeometric
cdf. Implementation changed to use sum of PMFs. - Statistics\Correlation
sampleCovariance,populationCorrelationCoefficient,sampleCorrelationCoefficient, throw BadDataException or OutOfBoundsException rather than division by zero for bad input data. - Statistics\Descriptive
coefficientOfVariationwill return NAN if mean is zero. Previously did division by zero. - Fix some typos in Statistics\Distance
hellinger,brayCurtis, andcanberrathat could have resulted in incorrect results. - Fix \Statistics\EffectSize
cohensQbounds check [-1, 1] and throw OutOfBoundsException when outside range, and return INF when r == 1 or -1. - Fix \Statistics\EffectSize boundary edge cases resulting in division by zero for
hedgesG,cohensD, andglassDelta.
Improvements
- Refactor the geometric mean implementation to use a numerically stable log-space calculation
- Refactor ChiSquared pdf to avoid raising 0 to negative exponent which is deprecated
- Refactor LogLogistic pdf and cdf to avoid raising 0 to negative exponent which is deprecated
- Improved implementation of NoncentralT
median - Probability\Distribution\Multivariate\Multinomial uses a higher numerical precision to reject probabilities that don't sum to 1.0
- Rewrote Statistics\Distribution
fractionalRankingto track original indices and use == for tie detection instead ofstrval()grouping, avoiding floating-point comparison bugs. - Statistics\Distribution
cumulativeFrequencyandcumulativeRelativeFrequencynow do a frequency distribution on sorted data, which was the original intent. - Statistics\Divergence
kullbackLeiblerandjensenShannonthrow an exception if there are non-negative probabilities. - Statistics\Distribution
stemAndLeafPlotthrows an exception if there are negative values. - Statistics\Experiment functions throw exceptions when input outside of range.
likelihoodRatioSSreturns infinity for rather than division by zero. - Statistics\Outlier edge cases throw exceptions: Grubbs' having fewer than 3 observations; standard deviation of zero; Support upper/lower as aliases for one sided in
grubbsCriticalValue. - Improved exception message for Functions\Support
checkLimitsto add invalid endpoint character in the exception message
v2.12.0
New Features
- Matrix Hessenberg decomposition
- New special functions
- Bessel functions
- Airy functions
- Legendre polynomials
- Chebyshev polynomials
- Hermite polynomials
- Laguerre polynomials
Bug Fixes
- Fixed issue 487 in t-test with data with no variance: throws proper exception
- Fixed issue with Set
isProperSubsetwhere it didn't take into account identical sets
Improvements
- Numerical precision improvements to numerous special functions
- Documentation improvements and fixes
v2.11.0
Improvements
- Minor changes for PHP 8.4 compatibility
v2.10.0
New Features
- NumberTheory\Integer
isPrime
v2.9.0
New Features
- Distance
chebyshev
Improvements
- Internal build CI/CD improvements
v2.8.1
Improvements
- Internal improvements to improve conformance with static analysis tools
v2.8.0
New Features
- Matrix
rowAddVector - Matrix
columnAddVector
Improvements
- Better error handling and exception message in
Sequence\NonIntenger::hyperharmonic - Internal code improvements to conform to static analysis checks
Backwards Incompatible Changes
- Helper method names changed (public abstract methods but not part of published interface)
NumericalDifferentiation::isTargetInPointschanged toassertTargetInPointsNumericalDifferentiation::isSpacingConstantchanged toassertSpacingConstant
v2.7.0
Improvements
- Improved algorithm for
regularizedIncompleteBeta: Addresses issue 458 - Issue 456: Improved PHPDoc blocks: Changed "number" to "int|float"
- Added PHP 8.2 for CI test target
v2.6.0
v2.6.0 - 2022-04-10
Improvements
Average::truncatedMeanbehavior at 50% trim made consistent- PHP 8.1 compatibility improvements
Backwards Incompatible Changes
Average::truncatedMeanthrows exception if trim percent greater than 50% rather than error or unpredictable results.
v2.5.0
New Features
- Special function
logbeta - Special function
logGamma - Special function
logGammaCorr - Special function
stirlingError
Improvements
- Improvements in StudentT continuous distribution
- Improvements in special function
gamma - Improvements in special function
beta
Bug Fixes
- Issue 393 (regularizedIncompleteBeta NAN)
- Issue 429 (Linear regression CI division by zero)