Phibonacci - Relation between Phi and Fibonacci You want to see how quickly the ratio of two consecutive Fibonacci numbers converges on φ.
Phi, known by the nickname &quot;the golden ratio&quot; and written as \$φ\$, is an irrational number, almost as popular as π and e. The exact value of \$φ\$ is \$\frac {1 + \sqrt 5} 2 = 1.618...\$
The Fibonacci sequence is a recursive series of integers calculated by
$$F_n = F_{n-1} + F_{n-2} \\
F_0 = 0 \\
F_1 = 1$$
Calculate \$φ\$'s value and the ratio \$\frac {F_n} {F_{n-1}}\$. How closely does \$φ\$ match the ratio?
Examples
\$n = 2\$, ratio: \$\frac 1 1 = 1.000\$, compared to \$1.618...\$, 0 decimal spots match
\$n = 5\$, ratio: \$\frac 5 3 = 1.666...\$, compared to \$1.618...\$, 1 decimal spot matches
Input
1 integer \$n\$ to calculate \$\frac{F_n}{F_{n-1}}\$
\$ n &gt;= 5\$
Output
1 integer \$x\$, indicating the number of decimal places that match the value of \$φ\$
It is acceptable that the program only works accurately until the float precision limit of the language.
Test Cases
Input -&gt; Output

5 -&gt; 1
10 -&gt; 2
12 -&gt; 2
15 -&gt; 5
20 -&gt; 7
23 -&gt; 7
25 -&gt; 9
50 -&gt; 18
100 -&gt; 39


Tips
Do not round the ratio of \$\frac{F_n}{F_{n-1}}\$
Rounding will give you errors.
Let's look at \$n = 5\$ again.
\$1.666...\$ rounds to \$1.7\$ and \$1.618...\$ rounds to \$1.6\$, so 0 is the wrong answer.
Useful information and math.
The limit of the ratios of the consecutive Fibonacci terms as  \$n\$  tends to infinity is the golden number \$φ\$. The inverse of this ratio is \$\frac 1 φ\$ which equals to \$φ−1\$.
\$\frac 1 φ = φ -1 \$
\$ \lim_{n \to \infty} \frac{F_n}{F_{n-1}} = φ\$
Winning criterion
Code Golf.
JavaScript (ES7),  77 75 69  67 bytes

n=&gt;(g=p=&gt;--n&gt;1?g(q,q+=p):(1+5**.5)/2*(m*=10)^q/p*m?0:1+g(p))(q=m=1)

Try it online!
Commented
n =&gt; (            // main function, taking n
  g = p =&gt;        // g is a recursive function taking p which, along with q,
                  // is used to compute the Fibonacci sequence
  --n &gt; 1 ?       // decrement n; if it's still greater than 1:
    g(q, q += p)  //   do a recursive call with (p, q) = (q, q + p)
  :               // else:
    (1 + 5 ** .5) //   compute the golden ratio
    / 2           //
    * (m *= 10)   //   multiply m by 10 and multiply the golden ratio by m
    ^             //   xor (forces the decimal places to be discarded)
    q / p         //   compute q / p (last Fibonacci term / penultimate one)
    * m           //   multiply by m
    ?             //   if the above values are not equal:
      0           //     stop
    :             //   else:
      1 + g(p)    //     increment the final result and do a recursive call
)(q = m = 1)      // initial call to g with p = q = m = 1