Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
trailing space
  • Loading branch information
mscuthbert committed Jun 5, 2022
commit e5ab32ec49c8d329e1bdfe90eec2bb77a67b9e77
2 changes: 1 addition & 1 deletion Lib/fractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def limit_denominator(self, max_denominator=1000000):
bound2_n = p1
bound2_d = q1
Comment thread
mscuthbert marked this conversation as resolved.

# diff1_n = numerator of (bound1 minus self) as a Fraction;
# diff1_n = numerator of (bound1 minus self) as a Fraction;
# etc. for diff1_d, diff2_n, diff2_d
diff1_n = abs(bound1_n*d_original - n_original*bound1_d)
diff1_d = d_original * bound1_d
Expand Down