]> gitweb.factorcode.org Git - factor.git/commitdiff
math.functions: move lcm to core/math
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 7 Sep 2023 17:15:12 +0000 (10:15 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 7 Sep 2023 17:15:12 +0000 (10:15 -0700)
basis/math/functions/functions.factor
core/math/math.factor

index 5ac743b76c98ed27eba6a3359274b2cf7461b48a..47238366f227aca4b45535f8c743e808b657b299 100644 (file)
@@ -105,9 +105,6 @@ PRIVATE>
 
 : nth-root ( n x -- y ) swap recip ^ ; inline
 
-: lcm ( a b -- c )
-    [ * ] 2keep simple-gcd /i ; foldable
-
 : divisor? ( m n -- ? )
     mod 0 = ; inline
 
index 6dad0ab295694fd4f2bd84b74727c406af3508cd..1ddb1ec6cc6a91a2526b69d17f530557fa5e1d7c 100644 (file)
@@ -230,6 +230,9 @@ M: fixnum simple-gcd fixnum-gcd ; inline
 
 M: bignum simple-gcd bignum-gcd ; inline
 
+: lcm ( a b -- c )
+    [ * ] 2keep simple-gcd /i ; foldable
+
 : fp-bitwise= ( x y -- ? ) [ double>bits ] same? ; inline
 
 GENERIC: fp-special? ( x -- ? )