Fastcode GCD32
From: Lars (lbg_at_adslhome.dk)
Date: 06/04/04
- Previous message: Dennis: "Re: Fastcode StrCopy B&V 2.1"
- Next in thread: Aleksey Kuznetsov: "Re: Fastcode GCD32"
- Reply: Aleksey Kuznetsov: "Re: Fastcode GCD32"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 4 Jun 2004 18:57:14 +0200
Hi
New and faster :-)
Regards
Lars
//Author: Lars Bloch Gravengaard
//Date: 4/6 2004
//Target: Pascal
function GCD_LBGPas2( A, B: Cardinal ): Cardinal;
var
Temp: Cardinal;
begin
while B > 1 do
begin
Temp := B;
B := A mod Temp;
A := Temp;
end;
if (A = 1) or (B = 1) then A:=1;
Result := A;
end;
- Previous message: Dennis: "Re: Fastcode StrCopy B&V 2.1"
- Next in thread: Aleksey Kuznetsov: "Re: Fastcode GCD32"
- Reply: Aleksey Kuznetsov: "Re: Fastcode GCD32"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]