Taddeus Kroes 14 жил өмнө
parent
commit
1a15deb503
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      src/rules/utils.py

+ 3 - 3
src/rules/utils.py

@@ -1,9 +1,9 @@
 from ..node import ExpressionLeaf as L, OP_MUL, OP_DIV
 
 
-def gcd(a, b):
+def greatest_common_divisor(a, b):
     """
-    Return greatest common divisor using Euclid's Algorithm.
+    Return greatest common divisor of a and b using Euclid's Algorithm.
     """
     while b:
         a, b = b, a % b
@@ -15,7 +15,7 @@ def lcm(a, b):
     """
     Return least common multiple of a and b.
     """
-    return a * b // gcd(a, b)
+    return a * b // greatest_common_divisor(a, b)
 
 
 def least_common_multiple(*args):