Skip to content

Commit 255b6b1

Browse files
committed
Avoid the Binary GCD algorithm for small integer values since Euclid usually beats it.
1 parent e43b2c5 commit 255b6b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/quicktions.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ cdef tuple _parse_fraction(AnyString s, Py_ssize_t s_len):
16601660
# Special case for 'small' numbers: normalise directly in C space.
16611661
if inum and decimal_len:
16621662
idenom = 10 ** decimal_len
1663-
igcd = _ibgcd[ullong](inum, idenom)
1663+
igcd = _igcd[ullong](inum, idenom)
16641664
if igcd > 1:
16651665
inum //= igcd
16661666
denom = idenom // igcd

0 commit comments

Comments
 (0)