Skip to content

Rewrite maths/fibonacci.py #5734

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

Merged
merged 24 commits into from
Nov 1, 2021
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad6c215
Rewrite parts of Vector and Matrix methods
tianyizheng02 Oct 16, 2021
f84d769
Refactor determinant method and add unit tests
tianyizheng02 Oct 17, 2021
86c03a8
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 17, 2021
72ada86
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 18, 2021
3756b2f
Reorganize Vector and Matrix methods
tianyizheng02 Oct 18, 2021
04a0845
Update linear_algebra/README.md
tianyizheng02 Oct 19, 2021
53f9953
Fix punctuation and wording
tianyizheng02 Oct 19, 2021
f176b18
Apply suggestions from code review
tianyizheng02 Oct 19, 2021
768bda8
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 29, 2021
36dd293
Deduplicate euclidean length method for Vector
tianyizheng02 Oct 29, 2021
6615be8
Add more unit tests for Euclidean length method
tianyizheng02 Oct 29, 2021
22af986
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 29, 2021
c3d5dfd
Fix bug in unit test for euclidean_length
tianyizheng02 Oct 29, 2021
45662fe
Remove old comments for magnitude method
tianyizheng02 Oct 30, 2021
29299ae
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 30, 2021
cabcf88
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Oct 31, 2021
66304f9
Rewrite maths/fibonacci.py
tianyizheng02 Oct 31, 2021
ea585c6
Merge branch 'TheAlgorithms:master' into master
tianyizheng02 Nov 1, 2021
3d97fd6
Rewrite timer and add unit tests
tianyizheng02 Nov 1, 2021
2cf941c
Fix typos in fib_binet unit tests
tianyizheng02 Nov 1, 2021
68f33f1
Fix typos in fib_binet unit tests
tianyizheng02 Nov 1, 2021
ba163ac
Merge branch 'master' of github.com:tianyizheng02/Python
tianyizheng02 Nov 1, 2021
2460ff6
Clean main method
tianyizheng02 Nov 1, 2021
1ed5398
Merge branch 'master' into master
tianyizheng02 Nov 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions maths/fibonacci.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def fib_binet(n: int) -> list[int]:
NOTE 1: this function diverges from fib_iterative at around n = 71, likely
due to compounding floating-point arithmetic errors

NOTE 2: this function overflows on n >= 1475 because of the size limitations
of Python floats
NOTE 2: this function doesn't accept n >= 1475 because it overflows
thereafter due to the size limitations of Python floats
>>> fib_binet(0)
[0]
>>> fib_binet(1)
Expand Down