public static BigUInt <N> Add(BigUInt <N> v1, UInt32 v2) { BigUInt <N> ret = v1.Copy(); ret.CarryAdd(0, v2); return(ret); }
public static BigUInt <N> RightRoundBlockShift(BigUInt <N> n, int sft) { BigUInt <N> ret = n.Copy(); ret.RightBlockShift(sft); if (sft >= 1 && sft <= Length && n.value[sft - 1] > UIntUtil.UInt32Round) { ret.CarryAdd(0, 1); } return(ret); }
public static BigUInt <N> RightRoundShift(BigUInt <N> n, int sft) { BigUInt <N> ret = n.Copy(); ret.RightShift(sft); if (sft >= 1 && sft <= Bits && UIntUtil.GetLSB(n.value, sft - 1) != 0) { ret.CarryAdd(0, 1); } return(ret); }