Sharith.MathUtils.XMath.RecProduct C# (CSharp) Method

RecProduct() public static method

public static RecProduct ( long s, int n, int m ) : Sharith.Arithmetic.XInt
s long
n int
m int
return Sharith.Arithmetic.XInt
        public static XInt RecProduct(long[] s, int n, int m)
        {
            if (n > m)
            {
                return XInt.One;
            }
            if (n == m)
            {
                return new XInt(s[n]);
            }

            int k = (n + m) >> 1;
            return RecProduct(s, n, k) * RecProduct(s, k + 1, m);
        }