SIGN IN SIGN UP

Minor optimization for Fractions.limit_denominator (GH-93730)

When we construct the upper and lower candidates in limit_denominator,
the numerator and denominator are already relatively prime (and the
denominator positive) by construction, so there's no need to go through
the usual normalisation in the constructor. This saves a couple of
potentially expensive gcd calls.

Suggested by Michael Scott Asato Cuthbert in GH-93477.
M
Mark Dickinson committed
420f0df862cf2290ad6a5e25286925ad197c9ef5
Parent: 8305137
Committed by GitHub <noreply@github.com> on 6/21/2022, 7:36:35 PM