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

Fixed problems with Petrick's method #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aniny21
Copy link

@Aniny21 Aniny21 commented Mar 11, 2024

#3

The following errors occur in certain cases.

ValueError: min() arg is an empty sequence

Here is an example of the input that would cause the error.

(1)
mt: 0 1 2 5 6 7

(2)
mt: 1 3 4 5 6 7 8 9 10 11 12 14

(3)
mt: 1 2 3 5 8
dc: 13 21 34

There seems to be a bug in the implementation of Petrick's method, which is executed when len(chart) != 0.

This pull request removes the multiply() and mul() functions and adds the Petrick class.

In addition, it has been changed to display multiple solutions when there are multiple solutions.

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.

1 participant