Mono.Math.BigInteger.Kernel.MultiplyByDword C# (CSharp) Method

MultiplyByDword() public static method

public static MultiplyByDword ( BigInteger n, uint f ) : BigInteger
n BigInteger
f uint
return BigInteger
			public static BigInteger MultiplyByDword (BigInteger n, uint f)
			{
				BigInteger ret = new BigInteger (Sign.Positive, n.length + 1);

				uint i = 0;
				ulong c = 0;

				do {
					c += (ulong)n.data [i] * (ulong)f;
					ret.data [i] = (uint)c;
					c >>= 32;
				} while (++i < n.length);
				ret.data [i] = (uint)c;
				ret.Normalize ();
				return ret;

			}