http://benji3up2kxewkqfcq7buxk2xd6zwy3zggnurkrm3l4cvwy2iipvyyad.onion/mirrors/gmpdoc/Fibonacci-Numbers-Algorithm.html
The formulas used are F[2k+1] = 4*F[k]^2 - F[k-1]^2 + 2*(-1)^k
F[2k-1] = F[k]^2 + F[k-1]^2
F[2k] = F[2k+1] - F[2k-1] At each step, k is the high b bits of n . If the next bit
of n is 0 then F[2k] , F[2k-1] is used, or if
it’s a 1 then F[2k+1] , F[2k] is used, and the process
repeated until all bits of n are incorporated.