>>100179479
>Why aren't you calculating fibonacci(10000000), /g/?
python has builtin bigint support so this should be easy
def fib():
prevprev = 0
prev = 1
cur = 1
while True:
yield cur
cur = prev + prevprev
prev, prevprev = cur, prev
if __name__ == "__main__":
import sys
k = int(sys.argv[1])
fibber = fib()
[print(f"{i+1}th fib: {next(fibber)}") for i in range(k)]
now let's try it:
ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit
lmao, I didn't even know that existed.