2,951
edits
(Separate from Or) Tag: Removed redirect |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Built-in|GCD| | {{Built-in|GCD|∨}} is a [[dyadic]] [[scalar function]] which returns the '''[[wikipedia:Greatest common divisor|Greatest Common Divisor]]''' of two integer arguments. It is an extension of [[Or]] which maintains the same results on [[Boolean]] arguments and the same [[identity element]] 0, in the same way that [[LCM]] extends [[And]]. | ||
== Examples == | == Examples == | ||
Line 41: | Line 41: | ||
== History == | == History == | ||
The use of GCD as an extension of [[Or]], and its extension to complex rational numbers, was proposed by [[Eugene McDonnell]] at [[APL75]].<ref>[[Eugene McDonnell]]. [https://doi.org/10.1145/800117.803810 "A Notation for the GCD and LCM Functions"] ([https://www.jsoftware.com/papers/eem/gcd.htm web]) at [[APL75]].</ref> This definition has become common among many APLs, with [[SHARP APL]], [[Dyalog APL]] (as of [[Dyalog APL 11.0|version 11.0]]), [[J]], [[NARS2000]], [[GNU APL]], [[ngn/apl]], and [[dzaima/APL]] adopting it. However, some APLs, such as [[APL2]] and [[APLX]], keep [[Or]] as a pure [[boolean function]] and do not extend it, while [[K]] uses the | The use of GCD as an extension of [[Or]], and its extension to complex rational numbers, was proposed by [[Eugene McDonnell]] at [[APL75]].<ref>[[Eugene McDonnell]]. [https://doi.org/10.1145/800117.803810 "A Notation for the GCD and LCM Functions"] ([https://www.jsoftware.com/papers/eem/gcd.htm web]) at [[APL75]].</ref> This definition has become common among many APLs, with [[SHARP APL]], [[Dyalog APL]] (as of [[Dyalog APL 11.0|version 11.0]]), [[J]], [[NARS2000]], [[GNU APL]], [[ngn/apl]], and [[dzaima/APL]] adopting it. However, some APLs, such as [[APL2]] and [[APLX]], keep [[Or]] as a pure [[boolean function]] and do not extend it, while [[K]] uses the [[Maximum]] function as Or. | ||
== External links == | == External links == |