]> gitweb.factorcode.org Git - factor.git/commitdiff
math: fix docs for gcd
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 31 Jan 2024 00:35:42 +0000 (16:35 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 31 Jan 2024 00:35:42 +0000 (16:35 -0800)
core/math/math-docs.factor

index a1e5562d1fffc0b4ca08189aa822435698b25a7e..38319f895fe0b2c8424cb96eab3fe7249750aee0 100644 (file)
@@ -245,7 +245,7 @@ HELP: >rect
 
 HELP: gcd
 { $values { "x" integer } { "y" integer } { "a" integer } { "d" integer } }
-{ $description "Computes the positive greatest common divisor " { $snippet "d" } " of " { $snippet "x" } " and " { $snippet "y" } ", and another value " { $snippet "a" } " satisfying:" { $code "a*y = d mod x" } }
+{ $description "Computes the positive greatest common divisor " { $snippet "d" } " of " { $snippet "x" } " and " { $snippet "y" } ", and another value " { $snippet "a" } " satisfying:" { $code "(a*x - d) mod y == 0" } }
 { $notes "If " { $snippet "d" } " is 1, then " { $snippet "a" } " is the inverse of " { $snippet "y" } " modulo " { $snippet "x" } "." } ;
 
 HELP: lcm