Skip to content

Commit

Permalink
corrected explanation for gcd(pk, qk) = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Kulkov authored Mar 31, 2022
1 parent aeb82e4 commit f7596e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/algebra/continued-fractions.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ In the code snippets we will mostly assume finite continued fractions.
$$

Thus, computation of a continued fraction representation for $r=\frac{p}{q}$ follows the same steps as the Euclidean algorithm for $p$ and $q$.

From this connection with the Euclidean algorithm it also follows that $\gcd(p, q) = 1$ for $[a_0; a_1, \dots, a_k]$. Hence, convergents are always irreducible.

=== "C++"
```cpp
Expand Down

0 comments on commit f7596e8

Please sign in to comment.