Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is

deprecated.  Based on patch by Mark Dickinson.
This commit is contained in:
Serhiy Storchaka 2015-05-13 00:19:51 +03:00
parent f0eeedf0d8
commit 48e47aaa28
9 changed files with 342 additions and 13 deletions

View file

@ -100,6 +100,14 @@ Number-theoretic and representation functions
<http://code.activestate.com/recipes/393090/>`_\.
.. function:: gcd(a, b)
Return the greatest common divisor of the integers *a* and *b*. If either
*a* or *b* is nonzero, then the value of ``gcd(a, b)`` is the largest
positive integer that divides both *a* and *b*. ``gcd(0, 0)`` returns
``0``.
.. function:: isfinite(x)
Return ``True`` if *x* is neither an infinity nor a NaN, and