Skip to content

Releases: markrogoyski/math-php

v2.13.0

24 Oct 05:48

Choose a tag to compare

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 getShoeSize has a typo and was getShowSize. 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 coefficientOfVariation will return NAN if mean is zero. Previously did division by zero.
  • Fix some typos in Statistics\Distance hellinger, brayCurtis, and canberra that could have resulted in incorrect results.
  • Fix \Statistics\EffectSize cohensQ bounds 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, and glassDelta.

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 fractionalRanking to track original indices and use == for tie detection instead of strval() grouping, avoiding floating-point comparison bugs.
  • Statistics\Distribution cumulativeFrequency and cumulativeRelativeFrequency now do a frequency distribution on sorted data, which was the original intent.
  • Statistics\Divergence kullbackLeibler and jensenShannon throw an exception if there are non-negative probabilities.
  • Statistics\Distribution stemAndLeafPlot throws an exception if there are negative values.
  • Statistics\Experiment functions throw exceptions when input outside of range. likelihoodRatioSS returns 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 checkLimits to add invalid endpoint character in the exception message

v2.12.0

18 Oct 02:15

Choose a tag to compare

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 isProperSubset where it didn't take into account identical sets

Improvements

  • Numerical precision improvements to numerous special functions
  • Documentation improvements and fixes

v2.11.0

26 Jan 21:01

Choose a tag to compare

Improvements

  • Minor changes for PHP 8.4 compatibility

v2.10.0

17 Apr 00:17

Choose a tag to compare

New Features

  • NumberTheory\Integer isPrime

v2.9.0

03 Mar 00:44

Choose a tag to compare

New Features

  • Distance chebyshev

Improvements

  • Internal build CI/CD improvements

v2.8.1

19 May 05:05

Choose a tag to compare

Improvements

  • Internal improvements to improve conformance with static analysis tools

v2.8.0

07 May 18:07

Choose a tag to compare

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::isTargetInPoints changed to assertTargetInPoints
    • NumericalDifferentiation::isSpacingConstant changed to assertSpacingConstant

v2.7.0

31 Dec 07:17

Choose a tag to compare

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

10 Apr 05:52

Choose a tag to compare

v2.6.0 - 2022-04-10

Improvements

  • Average::truncatedMean behavior at 50% trim made consistent
  • PHP 8.1 compatibility improvements

Backwards Incompatible Changes

  • Average::truncatedMean throws exception if trim percent greater than 50% rather than error or unpredictable results.

v2.5.0

22 Nov 06:06

Choose a tag to compare

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)