Greatest common divisor: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (→{{header|REXX}}: add (faster) version 3) |
Walterpachl (talk | contribs) (→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> |
<lang rexx>gcd: procedure |
||
x=abs(arg(1)) |
x=abs(arg(1)) |
||
do j=2 to arg() |
do j=2 to arg() |