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

fix: validation of element sequences with negative integers #43

Closed
sr-murthy opened this issue Mar 17, 2024 · 0 comments · Fixed by #44
Closed

fix: validation of element sequences with negative integers #43

sr-murthy opened this issue Mar 17, 2024 · 0 comments · Fixed by #44
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@sr-murthy
Copy link
Owner

sr-murthy commented Mar 17, 2024

Additional validation required for ContinuedFraction objects constructed from sequences of elements with negative integers - this should only be possible if the first element (a_0 = first quotient) is negative, and negative values for a_1, a_2,... etc should be considered invalid.

# Is valid
>>> ContinuedFraction.from_elements(-1, 2, 3)
ContinuedFraction(-4, 7)

# Should be invalid
>>> ContinuedFraction.from_elements(1, -2, 3)
ContinuedFraction(2, 5)

Changes required in

Test cases should be updated and/or added.

Docstrings and documentation should be updated as appropriate.

@sr-murthy sr-murthy added bug Something isn't working documentation Improvements or additions to documentation labels Mar 17, 2024
@sr-murthy sr-murthy self-assigned this Mar 17, 2024
@sr-murthy sr-murthy modified the milestones: Release, Release `0.11.17` Mar 17, 2024
sr-murthy added a commit that referenced this issue Mar 17, 2024
…` for negative elements + update tests and docstrings
sr-murthy added a commit that referenced this issue Mar 17, 2024
* chore: bump version refs to `0.11.17`

* fix: issue #43: input validation for `ContinuedFraction.from_elements` for negative elements + update tests and docstrings

* fix: issues #40, #41: support for self-referential type annotation, input validation and instance creation for `ContinuedFraction` methods

* docs: RST typesetting fixes + improvements
@sr-murthy sr-murthy linked a pull request Mar 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant