Beispiel #1
0
        // 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);
        }
Beispiel #2
0
 // Calculate function
 public override double Calc(double val)
 {
     return(LeftFunc.Calc(val) + RightFunc.Calc(val));
 }
Beispiel #3
0
 // Calculate function
 public override double Calc(double val)
 {
     return(Math.Pow(LeftFunc.Calc(val), RightFunc.Calc(val)));
 }