I am participating in a challenge where I have to calculate the first four and last four digits of the Fibonacci sequence. My first try was just using $x_n = x_{n-1} + x_{n-2}$ but that takes to long for $n = 50\times 10^6$, so I looked it up on Google and found that $$ x_n = \frac{\varphi^n - (1-\varphi)^n}{\sqrt{5}}. $$
This approach is definitely much faster, but the programming language python can't handle numbers that large, so I thought that I can change the value of numbers to make it possible for the programming language to calculate the $50\times 10^6$-th number of the Fibonacci sequence. I just said that the number 1 has a value of $10^6$. Then I multiplied every number in the formula by $10^{-6}$ hoping this technique would work but it didn't.
Can anyone explain to me why this method doesn't work? If you also know a solution to my Fibonacci problem then please share. Thanks