"Slow continued fraction algorithm via 2x2 matrices" - читать интересную книгу автора (Appelgate, Onishi.)