Skip to content

Commit dee63c6

Browse files
Apply batched suggestions from code review
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 4a9b705 commit dee63c6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎InternalDocs/fractions.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ https://github.com/mdickinson/snippets/tree/1f47f8cc33185c646b679647e88cb24f29fd
366366

367367
# Algorithms for rational arithmetic
368368

369-
In following we assume that rational numbers $\frac{p}{q}$ are
369+
In the following we assume that rational numbers $\frac{p}{q}$ are
370370
represented by fractions in lowest terms. That is, $p$ and $q$
371371
are coprime, $\gcd(p, q) = 1$. And, the denominator $q$ is positive.
372372

@@ -393,7 +393,7 @@ $$\gcd\left(p, b/g\right)
393393
and similarly\
394394
$$\gcd\left(p, d/g\right) = \gcd\left(c\left(b/g\right), d/g\right) = 1$$
395395

396-
The above allows us optimize reduction of the result to lowest
396+
The above allows us to optimize reduction of the result to lowest
397397
terms. Indeed,\
398398
$$h = \gcd\left(p, q\right)
399399
=\gcd\left(p, \left(b/g\right)\left(d/g\right) g\right)
@@ -411,7 +411,7 @@ denominator $q$ could be much larger than $g$.
411411
We should special-case $g = 1$ and $h = 1$, since 61% of randomly-chosen
412412
integers [are
413413
integers [are coprime](https://en.wikipedia.org/wiki/Coprime_integers#Probability_of_coprimality).
414-
Note that second case always holds for fractions, obtained from floats: here
414+
Note that the second case always holds for fractions, obtained from floats: here
415415
$g$ is a power of 2 and the unnormalized numerator $p$ is an odd integer.
416416

417417
## Multiplication

0 commit comments

Comments
 (0)