Skip to content

Commit ee909e2

Browse files
committed
test: update tests for fibonaccinum
1 parent 036533d commit ee909e2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/numbers.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@
2727
@test_throws DomainError catalannum(-1)
2828

2929
# fibonacci
30-
@test fibonaccinum(5) == 5
30+
# https://oeis.org/A000045
31+
# Fibonacci and Lucas Factorizations: https://mersennus.net/fibonacci/f1000.txt
32+
@test fibonaccinum.(0:10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
33+
@test fibonaccinum(92) == big"7540113804746346429"
34+
@test fibonaccinum(92) < typemax(Int64) < fibonaccinum(93)
3135
@test fibonaccinum(101) == parse(BigInt, "573147844013817084101")
36+
@test fibonaccinum(184) < typemax(Int128) < fibonaccinum(185)
37+
@test fibonaccinum(233) == (139801 * 25047390419633 * big"631484089583693149557829547141")
3238
@test_throws DomainError fibonaccinum(-1)
3339

3440
# lobb

0 commit comments

Comments
 (0)