public static CanonicalIntegerBoolean AddUnsigned(TIntT first, TIntT second, out TIntT result) { var result_ = unchecked (first + second); result = result_; return(CanonicalIntegerBooleanModule.LessThanOrEqual(first.ToUnsignedUnchecked(), result_.ToUnsignedUnchecked())); }
public static CanonicalIntegerBoolean DecreaseUnsigned(CanonicalIntegerBoolean borrow, TIntT value, out TIntT result) { var t = value - 1; return(CanonicalIntegerBooleanModule.Equals(0, value) | ConditionalDecreaseUnsigned(borrow, t, out result)); }
public static CanonicalIntegerBoolean DecreaseUnsigned(TIntT value, out TIntT result) { result = value - 1; return(CanonicalIntegerBooleanModule.Equals(0, value)); }
public static CanonicalIntegerBoolean IncreaseUnsigned(CanonicalIntegerBoolean carry, TIntT value, out TIntT result) { var t = 1 + value; return(CanonicalIntegerBooleanModule.Equals(-1, value.ToSignedUnchecked()) | ConditionalIncreaseUnsigned(carry, t, out result)); }
public static CanonicalIntegerBoolean IncreaseUnsigned(TIntT value, out TIntT result) { result = 1 + value; return(CanonicalIntegerBooleanModule.Equals(-1, value.ToSignedUnchecked())); }
public static CanonicalIntegerBoolean ConditionalDecreaseUnsigned(CanonicalIntegerBoolean borrow, TIntT value, out TIntT result) { ConditionalDecreaseUnchecked(borrow, value, out result); return(borrow & CanonicalIntegerBooleanModule.Equals(0, value)); }
public static CanonicalIntegerBoolean SubtractUnsigned(TIntT first, TIntT second, out TIntT result) { result = unchecked (first - second); return(CanonicalIntegerBooleanModule.GreaterThanOrEqual(first.ToUnsignedUnchecked(), second.ToUnsignedUnchecked())); }