Exemple #1
0
 public override double Calculate(double X)
 {
     if (LeftFunc != null)
     {
         return(LeftFunc.Calculate(X) - RightFunc.Calculate(X));
     }
     else
     {
         return(-RightFunc.Calculate(X));
     }
 }
 public override decimal Calculate(decimal X)
 {
     if (LeftFunc != null)
     {
         return(LeftFunc.Calculate(X) - RightFunc.Calculate(X));
     }
     else
     {
         return(-RightFunc.Calculate(X));
     }
 }
Exemple #3
0
 public override double Calculate(double X)
 {
     ThrowExceptionWithWrongInput();
     return(Math.Pow(LeftFunc.Calculate(X), RightFunc.Calculate(X)));
 }
 public override decimal Calculate(decimal X)
 {
     return(LeftFunc.Calculate(X) + RightFunc.Calculate(X));
 }
Exemple #5
0
 public override decimal Calculate(decimal X)
 {
     ThrowExceptionWithWrongInput();
     return((decimal)Math.Pow(Convert.ToDouble(LeftFunc.Calculate(X)), Convert.ToDouble(RightFunc.Calculate(X))));
 }
Exemple #6
0
 public override double Calculate(double X)
 {
     return(LeftFunc.Calculate(X) + RightFunc.Calculate(X));
 }
Exemple #7
0
 public override decimal Calculate(decimal X)
 {
     ThrowExceptionWithDenominator0();
     return(LeftFunc.Calculate(X) / RightFunc.Calculate(X));
 }