Greatest common divisor: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: add (faster) version 3)
(→‎REXX version 3: add {{trans}})
Line 2,725: Line 2,725:


===version 3===
===version 3===
{{trans|REXX}} using different argument handling-
Use as gcd(a,b,c,---)
Considerably faster than version 1 (and version 2)
Considerably faster than version 1 (and version 2)
<lang rexx>gcd3: procedure
<lang rexx>gcd: procedure
x=abs(arg(1))
x=abs(arg(1))
do j=2 to arg()
do j=2 to arg()