Convergents continuation of fractions is a useful method for a better and better fractional representation of an irrational number. I also found them useful in understanding relationships with other ideas using the Euclidean algorithm .
pi .
ClearAll[approximate];
approximate[r_, nConvergents_: 8, precision_: 10] :=
With[{c = Convergents[ContinuedFraction[r, nConvergents]]},
TableForm[Transpose[{c, N[r - c, precision]}],
TableHeadings -> {None, {Row[{"approximation of ", r}], "error"}}]]
8 pi:
approximate[Pi]

8 Sqrt[2]:
approximate[Sqrt[2]]

.
approximate .
Enjoy.
, .