]> gitweb.factorcode.org Git - factor.git/blobdiff - core/math/math-docs.factor
math: fix docs for gcd
[factor.git] / 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