public override Function Multiply(Function f) { Constant c = f as Constant; if(c != null) { return new Multiple(c.Value, this); } if(f is Variable) { return base.Multiply(f); } return f.Multiply(this); }