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

Adjust Ln method to prevent infinity iteration loops #357

Merged
merged 4 commits into from Apr 1, 2024
Merged

Conversation

mwoss
Copy link
Member

@mwoss mwoss commented Apr 1, 2024

Small adjustment to the Ln method. In extremely rare cases Halley's iteration method could oscillate and cause an infinity loop. We could prevent that by adding two guards - max iterations and step oscillation guards. This should resolve this edge case :3

@mwoss mwoss merged commit 2b68c56 into master Apr 1, 2024
6 checks passed
@mwoss mwoss deleted the ln-ifinity-loop branch April 1, 2024 20:02
epelc pushed a commit to greatcloak/decimal that referenced this pull request Apr 7, 2024
* Adjust Ln method to prevent infinity iteration loops
* Add test case for infinity loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant