We study the probabilistic behaviour of the continued fraction expansion of a
quadratic irrational number, when weighted by some "additive" cost. We prove
asymptotic Gaussian limit laws, with an optimal speed of convergence. We deal
with the underlying dynamical system associated with the Gauss map, and its
weighted periodic trajectories. We work with analytic combinatorics methods,
and mainly with bivariate Dirichlet generating functions; we use various tools,
from number theory (the Landau Theorem), from probability (the Quasi-Powers
Theorem), or from dynamical systems: our main object of study is the (weighted)
transfer operator, that we relate with the generating functions of interest.
The present paper exhibits a strong parallelism with the methods which have
been previously introduced by Baladi and Vall\'ee in the study of rational
trajectories. However, the present study is more involved and uses a deeper
functional analysis framework.Comment: 39 pages In this second version, we have added an annex that provides
a detailed study of the trace of the weighted transfer operator. We have also
corrected an error that appeared in the computation of the norm of the
operator when acting in the Banach space of analytic functions defined in the
paper. Also, we give a simpler proof for Theorem