How do I solve a Continued Fraction of solution to quadratic equation? I know that it is possible to make a CF (continued fraction) for every number that is a solution of a quadratic equation but I don't know how.
The number I'd like to write as a CF is:
$$\frac{1 - \sqrt 5}{2}$$
How do I tackle this kind of problem?

Suppose $x$ is a root of $p(z) = z^2 - b z - c$. Then, diving $p(z)$ over $z$ and solving that for $z$ gets us
$$
    z = b+ \frac{c}{z} 
$$
Iterating:
$$
   z = b + \cfrac{c}{b + \cfrac{c}{z}} = \cfrac{b}{c + \cfrac{c}{b+ \ddots}}
$$
Since $\frac{1-\sqrt{5}}{2}$ is a root of $z^2 - z -1$ we have:
$$
   \frac{1-\sqrt{5}}{2} = -\frac{1}{\frac{1+\sqrt{5}}{2}} = - \cfrac{1}{1 + \cfrac{1}{1+ \frac{1}{1+\ddots}}}
$$

Added: Consider a sequence, defined by $x_{n+1} = b + \frac{c}{x_n}$, with $x_0 = \frac{c}{y}$. Few initial terms of the sequence are $\frac{c}{y}$, $b + y$, $b + \cfrac{c}{b+y}$, $b + \cfrac{c}{b + \cfrac{c}{b+y}}$, etc. It is well known that terms of this sequence can also be obtained as a ratio of two solutions, $a_n$ and $b_n$ to the following recurrence equation:
$$
      v_{n} = b v_{n-1} + c v_{n-2} \tag{1}
$$
with initial conditions $a_0=y$, $a_1 = c$ and $b_0 = 1-\frac{b}{c} y$, $b_1 = y$. Then $x_n = \cfrac{a_n}{b_n}$. The solution to $(1)$ has the form:
$$
    v_{n} = v_0 \frac{z_1 z_2^n - z_2 z_1^n}{z_1-z_2} + v_1 \frac{z_1^n - z_2^n}{z_1-z_2}
$$
where $z_1$ and $z_2$ are the two roots of $z^2 - b z -c = 0$. Assume $z_2>z_1$. In the large $n$ limit, 
$$
   \lim_{n \to \infty} x_n =  \lim_{n \to \infty} \frac{a_n}{b_n}= \lim_{n\to \infty} \frac{a_1 (z_1^n - z_2^n) + a_0 (z_1 z_2^n - z_1^n z_2)}{b_1 (z_1^n - z_2^n) + b_0 (z_1 z_2^n - z_1^n z_2)} = \frac{a_0 z_1 - a_1}{b_0 z_1 - b_1} = \frac{c (c- y z_1)}{c (y - z_1) + b y z_1} 
$$
In the case at hand $x_0 = \infty$ and $x_1 = b$, corresponding to the limit of $y \to \infty$, in which case the value of the continued fraction becomes:
$$
  \lim_{n \to \infty} x_n =  \lim_{y \to 0} \frac{c (c- y z_1)}{c (y - z_1) + b y z_1}  = - \frac{c}{z_1} = z_2
$$
