Continued fraction writeup.