public override Numeric addReversed(Numeric x, int k) { if (!(x is RatNum)) { throw new ArgumentException(); } return(RatNum.add((RatNum)x, this, k)); }
public override Numeric add(object y, int k) { if (y is RatNum) { return(RatNum.add(this, (RatNum)y, k)); } if (!(y is Numeric)) { throw new ArgumentException(); } return(((Numeric)y).addReversed(this, k)); }