Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from markrogoyski:master #7

Open
wants to merge 63 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 10, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Apr 10, 2022
markrogoyski and others added 19 commits April 17, 2022 15:12
* Issue 458: Fix division-by-zero error in Special::regularizedIncompleteBeta()

Switched to a slightly different algorithm for computing the continued fraction. Removed Special::iBetaCF(), which was a private function only used by regularizedIncompletBeta() and no longer needed.

* Cross-check test values for Special::regularizedIncompleteBeta

Values were verified against Wolfram Alpha (using its "BetaRegularized[x, a, b]" function) as well as the online calculator mentioned in comments for dataProviderForRegularizedIncompleteBeta().

* Add tests for issue #458
…consistent with other row and column operations.
Smoren and others added 30 commits April 25, 2023 20:11
…nvectors` (#473)

* Test Eigenvectors can handle numerical imprecision

To mimic the error found in the QR algorithm, we have to test with matrices that have duplicate eigenvalues and introduce numerical precision errors.

To do this, a list of perturbed eigenvalues is passed to the eigenvectors method. The perturbation is achieved by adding a random +/- offset on an order of magnitude smaller than the default matrix error. This should allow the math to work out fine while causing the floating point comparison to fail.

* Replace array_search with floating-point filter

array_search seems to fail in most cases when looking for a float in an array of floats. And even if it does find a match, if the key is 0, php evaluates `!0` to true.

To find a match, we can instead loop through and compare the numbers with `Arithmetic::almostEqual` and then explicitly check if `$key === false`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants