CSScheme.Primitive.lcm C# (CSharp) Méthode

lcm() static private méthode

static private lcm ( Object args ) : Object
args Object
Résultat Object
        static Object lcm(Object args)
        {
            long L = 1, g = 1;
            while (args is Pair)
            {
                long n = Math.Abs((long)num(first(args)));
                g = gcd2(n, L);
                L = (g == 0) ? g : (n / g) * L;
                args = rest(args);
            }
            return num(L);
        }