TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
29.7k stars 7.05k forks source link

fix: babylonian_method algorithm bug with wrong comparison #2668

Closed thenamehasbeentake closed 5 months ago

thenamehasbeentake commented 7 months ago

Description of Change

fix: the end condition of the babylonian_method and add testcase 3. The double type precision problem causes the original test cases to be inaccurate.

Checklist

Notes:

github-actions[bot] commented 5 months ago

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 5 months ago

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!