Difference between revisions of "Template:Gcd"

From blackwiki
Jump to navigation Jump to search
imported>Ezhiki
m (tweaked)
imported>Prolog
m (Removed protection from "Template:Gcd": Template has been deprecated)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#ifexpr:{{{2}}}=0|{{{1}}|{{gcd|{{{2}}}|{{{1}}} mod {{{2}}}}}}}
+
{{#invoke:math|gcd}}<noinclude>
 +
{{documentation}}
 +
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
 +
</noinclude>

Latest revision as of 21:16, 23 March 2017

Template documentation[view] [edit] [history] [purge]

This template calculates the greatest common divisor (gcd) of two or more parameters.

Examples

  • {{gcd|16|6}} → 2
  • {{gcd|360|180|120|90}} → 30
  • {{gcd|544|119}} → 17
  • {{gcd|2089|3571}} → 1