convergents function

Partial convergents of continued fractions