// Calculate function public override double Calc(double val) { var a = LeftFunc.Calc(val); if (Math.Abs(a) <= 10e-6) { return(a); } var b = RightFunc.Calc(val); if (Math.Abs(b) <= 10e-6) { return(b); } return(a * b); }
// Calculate function public override double Calc(double val) { return(LeftFunc.Calc(val) + RightFunc.Calc(val)); }
// Calculate function public override double Calc(double val) { return(Math.Pow(LeftFunc.Calc(val), RightFunc.Calc(val))); }