Algebraic theory of quadratic numbers.