raw
ffa_ch15_gcd.kv         1 ------------------------------------------------------------------------------
ffa_ch15_gcd.kv 2 ------------------------------------------------------------------------------
ffa_ch15_gcd.kv 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch15_gcd.kv 4 -- --
ffa_ch15_gcd.kv 5 -- (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch15_gcd.kv 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch15_gcd.kv 7 -- --
ffa_ch15_gcd.kv 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch15_gcd.kv 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch15_gcd.kv 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch15_gcd.kv 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch15_gcd.kv 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch15_gcd.kv 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch15_gcd.kv 14 -- that you use - for any purpose. --
ffa_ch15_gcd.kv 15 -- --
ffa_ch15_gcd.kv 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch15_gcd.kv 17 ------------------------------------------------------------------------------
ffa_ch15_gcd.kv 18 ------------------------------------------------------------------------------
ffa_ch15_gcd.kv 19
ffa_ch15_gcd.kv 20 with FZ_Type; use FZ_Type;
ffa_ch15_gcd.kv 21
ffa_ch15_gcd.kv 22
ffa_ch15_gcd.kv 23 package FZ_GCD is
ffa_ch15_gcd.kv 24
ffa_ch15_gcd.kv 25 pragma Pure;
ffa_ch15_gcd.kv 26
ffa_ch15_gcd.kv 27 -- Find Greatest Common Divisor (GCD) of X and Y.
ffa_ch15_gcd.kv 28 procedure FZ_Greatest_Common_Divisor(X : in FZ;
ffa_ch15_gcd.kv 29 Y : in FZ;
ffa_ch15_gcd.kv 30 Result : out FZ);
ffa_ch15_gcd.kv 31 pragma Inline_Always(FZ_Greatest_Common_Divisor);
ffa_ch15_gcd.kv 32
ffa_ch15_gcd.kv 33 end FZ_GCD;