Power function in log n
function power ( F , n ) { if ( n == 0 n == 1 ) { return ; } var M = [ [ 1 , 1 ] , [ 1 , 0 ] ] ; power ( F , parseInt ( n / 2 ) ) ; multiply ( F , F ) ; if ( n % 2 != 0 ) { multiply ( F , M ) ; } }