/// <summary> /// Mantissa - Mantissa, Exponent - Exponent /// </summary> /// <param name="other"></param> /// <returns>The resulting OfcNumber</returns> public OfcNumber SubtractEach(OfcNumber other) { var num = this; num.Number -= other.Number * (other.IsNegative ? -1 : 1); num.Exponent -= other.Exponent; return(num); }
/// <summary> /// Mantissa + Mantissa, Exponent + Exponent /// </summary> /// <param name="other"></param> /// <returns>The resulting OfcNumber</returns> public OfcNumber AddEach(OfcNumber other) { var num = this; num.Number += other.Number * (other.IsNegative ? -1 : 1); num.Exponent += other.Exponent; return(num); }
public bool Equals(OfcNumber other) { return(IsNegative == other.IsNegative && Number == other.Number && Exponent == other.Exponent); }